{"id":70010,"date":"2026-11-09T08:03:14","date_gmt":"2026-11-09T02:33:14","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/games\/backgammon\/"},"modified":"2026-11-09T08:03:14","modified_gmt":"2026-11-09T02:33:14","slug":"backgammon","status":"publish","type":"page","link":"https:\/\/www.quickonlinetips.com\/archives\/games\/backgammon\/","title":{"rendered":"Backgammon: Play Online Against the Computer or a Friend"},"content":{"rendered":"<p>Play <strong>Backgammon<\/strong> free online against the computer or a friend. Roll the dice, move your 15 checkers around the board, hit your opponent&#8217;s single checkers, and be the first to bring all your checkers home and bear them off. Full rules, three computer levels, pip counts and undo are built in.<\/p>\n<style>.qbg-board{background:#1F2A44;border-radius:12px;padding:16px 8px;max-width:660px;margin:12px auto 0;user-select:none;-webkit-user-select:none;touch-action:manipulation;box-shadow:0 3px 10px rgba(0,0,0,.25)} .qbg-half{display:grid;grid-template-columns:repeat(6,1fr) .8fr repeat(6,1fr) 1fr;gap:2px;background:#2D4A66;padding:0 3px} .qbg-top{border-radius:6px 6px 0 0} .qbg-bot{border-radius:0 0 6px 6px} .qbg-pt{position:relative;aspect-ratio:1\/5.4;cursor:pointer;border-radius:3px} .qbg-tri{position:absolute;inset:0;clip-path:polygon(0 0,100% 0,50% 90%)} .qbg-bot .qbg-tri{clip-path:polygon(50% 10%,100% 100%,0 100%)} .qbg-sand{background:#E8D4A2} .qbg-steel{background:#8DA9C4} .qbg-stk{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;padding:1px 0} .qbg-bot .qbg-stk{flex-direction:column-reverse} .qbg-ck{width:92%;aspect-ratio:1;border-radius:50%;flex:0 0 auto;display:flex;align-items:center;justify-content:center;font-size:clamp(9px,2.4vw,13px);font-weight:800;line-height:1;box-sizing:border-box} .qbg-w{background:radial-gradient(circle at 35% 30%,#FFFFFF,#F3EBD7 60%,#D9CBA6);border:1px solid #B9A97F;color:#1F2A44} .qbg-r{background:radial-gradient(circle at 35% 30%,#F87171,#C0392B 60%,#8E1B12);border:1px solid #6B1510;color:#FFFFFF} .qbg-no{position:absolute;left:0;right:0;text-align:center;font-size:9px;font-weight:700;color:#A9BBD0;pointer-events:none} .qbg-top .qbg-no{top:-13px} .qbg-bot .qbg-no{bottom:-13px} .qbg-bar{position:relative;background:#1A2338;cursor:pointer} .qbg-off{position:relative;background:#16203A;border-radius:4px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:1px;padding:3px 2px} .qbg-bot .qbg-off{flex-direction:column-reverse} .qbg-slab{width:86%;height:4px;border-radius:2px;flex:0 0 auto} .qbg-offn{font-size:11px;font-weight:800;color:#E2E8F0;margin:2px 0} .qbg-can{box-shadow:inset 0 0 0 2px #FACC15} .qbg-sel{box-shadow:inset 0 0 0 3px #22C55E} .qbg-tgt::after{content:\"\";position:absolute;inset:0;background:rgba(74,222,128,.42);border-radius:3px;box-shadow:inset 0 0 0 2px #4ADE80} .qbg-last{box-shadow:inset 0 0 0 2px #F472B6} .qbg-mid{display:flex;justify-content:center;align-items:center;gap:8px;min-height:54px;background:#24324F;padding:6px} .qbg-die{width:38px;height:38px;border-radius:8px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);padding:5px;box-sizing:border-box;box-shadow:0 2px 3px rgba(0,0,0,.4)} .qbg-die i{display:block;width:7px;height:7px;border-radius:50%;margin:auto;visibility:hidden} .qbg-die i.qbg-on{visibility:visible} .qbg-dw{background:#FFFDF6} .qbg-dw i{background:#1F2A44} .qbg-dr{background:#C0392B} .qbg-dr i{background:#FFFFFF} .qbg-used{opacity:.28} .qbg-hint{color:#CBD5E1;font-size:14px;font-weight:600} .qbg-msg{text-align:center;font-size:18px;font-weight:700;color:#215387;min-height:2.6em;margin:6px 0 0} .qbg-sw{display:inline-block;width:13px;height:13px;border-radius:50%;vertical-align:-2px;margin-right:4px}<\/style>\n<div class=\"qt-tool\" id=\"qbg\"><p class=\"qt-label\" style=\"font-size:1.15em;margin:0 0 10px\"><strong>Step 1:<\/strong> Choose your opponent<\/p> <div class=\"qt-grid\"><div class=\"qt-field\"><label for=\"qbg-mode\">Opponent<\/label><select id=\"qbg-mode\"><option value=\"1\">Computer: easy<\/option><option value=\"2\" selected>Computer: medium<\/option><option value=\"3\">Computer: hard<\/option><option value=\"2p\">Friend (2 players)<\/option><\/select><\/div><\/div> <p class=\"qt-label\" style=\"font-size:1.15em;margin:18px 0 10px\"><strong>Step 2:<\/strong> Roll the dice, tap a checker, then tap where it should go<\/p> <p class=\"qbg-msg\" id=\"qbg-msg\" aria-live=\"polite\"><\/p> <div class=\"qbg-board\" id=\"qbg-board\"><div class=\"qbg-half qbg-top\" id=\"qbg-top\"><\/div><div class=\"qbg-mid\" id=\"qbg-dice\"><\/div><div class=\"qbg-half qbg-bot\" id=\"qbg-bot\"><\/div><\/div> <div class=\"qt-row\" style=\"justify-content:center\"><button type=\"button\" class=\"qt-btn qt-btn-big\" id=\"qbg-roll\">Roll dice<\/button><button type=\"button\" class=\"qt-btn qt-btn-ghost\" id=\"qbg-undo\">Undo moves<\/button><button type=\"button\" class=\"qt-btn qt-btn-ghost\" id=\"qbg-new\">New game<\/button><\/div> <div class=\"qt-stats\"><div class=\"qt-stat\"><span class=\"qt-num\" id=\"qbg-s0\">0<\/span><span class=\"qt-lab\"><span class=\"qbg-sw qbg-w\"><\/span><span id=\"qbg-l0\">Your points<\/span><\/span><\/div><div class=\"qt-stat\"><span class=\"qt-num\" id=\"qbg-s1\">0<\/span><span class=\"qt-lab\"><span class=\"qbg-sw qbg-r\"><\/span><span id=\"qbg-l1\">Computer points<\/span><\/span><\/div><div class=\"qt-stat\"><span class=\"qt-num\" id=\"qbg-p0\">167<\/span><span class=\"qt-lab\" id=\"qbg-pl0\">Your pip count<\/span><\/div><div class=\"qt-stat\"><span class=\"qt-num\" id=\"qbg-p1\">167<\/span><span class=\"qt-lab\" id=\"qbg-pl1\">Computer pip count<\/span><\/div><\/div> <p class=\"qt-note\"><strong>Private by design:<\/strong> the dice, the game and the computer player run in your own browser. Nothing is sent to QuickOnlineTips or stored.<\/p><\/div>\n<script>(function () { function qtReady(fn) { if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', fn); } else { fn(); } } function qtRand32() { var c = window.crypto || window.msCrypto; if (c) { if (c.getRandomValues) { var a = new Uint32Array(1); c.getRandomValues(a); return a[0]; } } return Math.floor(Math.random() * 4294967296); } function qtRandInt(range) { var limit = Math.floor(4294967296 \/ range) * range; var x = qtRand32(); while (x >= limit) { x = qtRand32(); } return x % range; } qtReady(function () { var root = document.getElementById('qbg'); if (!root) { return; } function $(id) { return document.getElementById('qbg-' + id); } var st, turn = 0, dice = [], rolled = [], seqList = [], done = [], startSt = null, startDice = [], sel = -1, over = false, busy = false, needRoll = true, tmr = 0, score = [0, 0], last = [], ptEl = [], barEl = [], offEl = []; var PIPS = [[], [4], [0, 8], [0, 4, 8], [0, 2, 6, 8], [0, 2, 4, 6, 8], [0, 2, 3, 5, 6, 8]]; function sgn(p) { return p === 0 ? 1 : -1; } function vsAI() { return $('mode').value !== '2p'; } function name(p) { return vsAI() ? (p === 0 ? 'You' : 'The computer') : (p === 0 ? 'White' : 'Red'); } function humanTurn() { return vsAI() ? turn === 0 : true; } function say(t) { $('msg').textContent = t; } function copy(s) { return { pts: s.pts.slice(), bar: s.bar.slice(), off: s.off.slice() }; } function keyOf(s) { return s.pts.join(',') + '|' + s.bar.join(',') + '|' + s.off.join(','); } function homeAll(s, p) { if (s.bar[p] > 0) { return false; } var g = sgn(p), i; for (i = 0; 24 > i; i++) { if (s.pts[i] * g > 0) { if (p === 0 ? i > 5 : 18 > i) { return false; } } } return true; } function farthest(s, p, i) { var g = sgn(p), k; if (p === 0) { for (k = i + 1; 24 > k; k++) { if (s.pts[k] * g > 0) { return false; } } } else { for (k = 0; i > k; k++) { if (s.pts[k] * g > 0) { return false; } } } return true; } function single(s, p, d) { var out = [], g = sgn(p), i, t; if (s.bar[p] > 0) { t = p === 0 ? 24 - d : d - 1; if (2 > -s.pts[t] * g) { out.push({ f: 24, t: t, d: d }); } return out; } var home = homeAll(s, p); for (i = 0; 24 > i; i++) { if (s.pts[i] * g > 0) { t = p === 0 ? i - d : i + d; if (t >= 0 ? 23 >= t : false) { if (2 > -s.pts[t] * g) { out.push({ f: i, t: t, d: d }); } } else if (home) { if ((p === 0 ? t === -1 : t === 24) || farthest(s, p, i)) { out.push({ f: i, t: 25, d: d }); } } } } return out; } function apply(s, p, m) { var n = copy(s), g = sgn(p); if (m.f === 24) { n.bar[p]--; } else { n.pts[m.f] -= g; } if (m.t === 25) { n.off[p]++; } else { if (n.pts[m.t] === -g) { n.pts[m.t] = 0; n.bar[1 - p]++; } n.pts[m.t] += g; } return n; } function seqs(s, p, ds) { var out = [], maxLen = 0; function rec(cur, rem, path) { var any = false, tried = {}; for (var k = 0; rem.length > k; k++) { var d = rem[k]; if (tried[d]) { continue; } tried[d] = 1; var ms = single(cur, p, d); for (var j = 0; ms.length > j; j++) { any = true; var nr = rem.slice(); nr.splice(k, 1); rec(apply(cur, p, ms[j]), nr, path.concat([ms[j]])); } } if (!any) { if (path.length >= maxLen) { if (path.length > maxLen) { maxLen = path.length; out = []; } out.push({ moves: path, st: cur }); } } } rec(s, ds, []); if (maxLen === 1) { if (ds.length === 2) { if (ds[0] !== ds[1]) { var hi = Math.max(ds[0], ds[1]), big = out.filter(function (x) { return x.moves[0].d === hi; }); if (big.length) { out = big; } } } } return out; } function pip(s, p) { var g = sgn(p), t = s.bar[p] * 25, i; for (i = 0; 24 > i; i++) { if (s.pts[i] * g > 0) { t += s.pts[i] * g * (p === 0 ? i + 1 : 24 - i); } } return t; } function shotsAt(s, p, i) { var q = 1 - p, g = sgn(q), n = 0, j, dd; for (j = 0; 24 > j; j++) { if (s.pts[j] * g > 0) { dd = q === 0 ? j - i : i - j; if (dd > 0) { if (6 >= dd) { n += 2; } else if (12 >= dd) { n += 1; } } } } if (s.bar[q] > 0) { dd = q === 0 ? 24 - i : i + 1; if (6 >= dd) { n += 3; } else if (12 >= dd) { n += 1; } } return Math.min(n, 8); } function isRace(s) { if (s.bar[0] + s.bar[1] > 0) { return false; } var max0 = -1, min1 = 24, i; for (i = 0; 24 > i; i++) { if (s.pts[i] > 0) { max0 = i; } if (0 > s.pts[i]) { if (min1 === 24) { min1 = i; } } } return min1 > max0; } function primeLen(s, p) { var g = sgn(p), best = 0, run = 0, i; for (i = 0; 24 > i; i++) { if (s.pts[i] * g >= 2) { run++; if (run > best) { best = run; } } else { run = 0; } } return best; } function evalSt(s, p) { var q = 1 - p, g = sgn(p), v = (pip(s, q) - pip(s, p)) + (s.off[p] - s.off[q]) * 4 + (s.bar[q] - s.bar[p]) * 12, i, n, dist; if (isRace(s)) { return v * 2 + s.off[p] * 6; } for (i = 0; 24 > i; i++) { n = s.pts[i] * g; if (0 >= n) { continue; } dist = p === 0 ? i : 23 - i; if (n === 1) { v -= shotsAt(s, p, i) * (6 > dist ? 1.6 : 1.1); } else { v += 6 > dist ? 6 : (12 > dist ? 3 : 1.5); if (n > 4) { v -= (n - 4) * 1.5; } } } v += Math.max(0, primeLen(s, p) - 1) * 4; return v; } function aiChoose(p) { var lvl = $('mode').value; if (!seqList.length) { return null; } if (lvl === '1') { if (qtRandInt(10) > 2) { return seqList[qtRandInt(seqList.length)]; } } var seen = {}, best = seqList[0], bv = -Infinity; seqList.forEach(function (x) { var k = keyOf(x.st); if (seen[k]) { return; } seen[k] = 1; var v = evalSt(x.st, p) + (lvl === '3' ? 0 : qtRandInt(5)); if (v > bv) { bv = v; best = x; } }); return best; } function opts() { var out = [], n = done.length; seqList.forEach(function (x) { if (x.moves.length > n) { for (var k = 0; n > k; k++) { var a = x.moves[k], b = done[k]; if (a.f !== b.f || a.t !== b.t || a.d !== b.d) { return; } } out.push(x.moves[n]); } }); return out; } function rollTxt() { var a = rolled[0], b = rolled[1]; return name(turn) + ' rolled ' + a + ' and ' + b + (a === b ? ' (doubles: four moves of ' + a + ')' : '') + '.'; } function mkDie(v, used, red) { var d = document.createElement('div'), k; d.className = 'qbg-die ' + (red ? 'qbg-dr' : 'qbg-dw') + (used ? ' qbg-used' : ''); d.setAttribute('aria-label', 'Die showing ' + v); for (k = 0; 9 > k; k++) { var i = document.createElement('i'); if (PIPS[v].indexOf(k) > -1) { i.className = 'qbg-on'; } d.appendChild(i); } return d; } function drawDice() { var D = $('dice'); D.textContent = ''; if (needRoll) { if (!over) { var h = document.createElement('span'); h.className = 'qbg-hint'; h.textContent = busy ? 'Rolling...' : (humanTurn() ? 'Press Roll dice' : ''); D.appendChild(h); } return; } var full = rolled[0] === rolled[1] ? [rolled[0], rolled[0], rolled[0], rolled[0]] : rolled.slice(), rem = dice.slice(); full.forEach(function (v) { var k = rem.indexOf(v), used = k === -1; if (!used) { rem.splice(k, 1); } D.appendChild(mkDie(v, used, turn === 1)); }); } function fillStack(box, n, p, max) { box.textContent = ''; var show = Math.min(n, max), k; for (k = 0; show > k; k++) { var c = document.createElement('div'); c.className = 'qbg-ck ' + (p === 0 ? 'qbg-w' : 'qbg-r'); if (k === show - 1) { if (n > max) { c.textContent = n; } } box.appendChild(c); } } function draw() { var os = (over || busy || needRoll || !humanTurn()) ? [] : opts(), srcs = {}, tg = {}, i; os.forEach(function (m) { srcs[m.f] = 1; if (m.f === sel) { tg[m.t] = 1; } }); for (i = 0; 24 > i; i++) { var e = ptEl[i], n = st.pts[i]; fillStack(e.stk, Math.abs(n), n > 0 ? 0 : 1, 5); e.el.className = 'qbg-pt' + (srcs[i] ? ' qbg-can' : '') + (sel === i ? ' qbg-sel' : '') + (tg[i] ? ' qbg-tgt' : '') + (last.indexOf(i) > -1 ? ' qbg-last' : ''); e.el.setAttribute('aria-label', 'Point ' + (i + 1) + ': ' + (n === 0 ? 'empty' : Math.abs(n) + (n > 0 ? ' white' : ' red'))); e.el.dataset.n = n; } [0, 1].forEach(function (p) { var b = barEl[p]; fillStack(b.stk, st.bar[p], p, 4); b.el.className = 'qbg-bar' + (p === turn ? (srcs[24] ? ' qbg-can' : '') + (sel === 24 ? ' qbg-sel' : '') : ''); b.el.dataset.n = st.bar[p]; b.el.setAttribute('aria-label', st.bar[p] + ' ' + (p === 0 ? 'white' : 'red') + ' on the bar'); var o = offEl[p]; o.el.textContent = ''; var lab = document.createElement('span'); lab.className = 'qbg-offn'; lab.textContent = st.off[p]; o.el.appendChild(lab); for (var k = 0; st.off[p] > k; k++) { var sl = document.createElement('div'); sl.className = 'qbg-slab ' + (p === 0 ? 'qbg-w' : 'qbg-r'); o.el.appendChild(sl); } o.el.className = 'qbg-off' + (p === turn ? (tg[25] ? ' qbg-tgt' : '') : ''); o.el.dataset.n = st.off[p]; o.el.setAttribute('aria-label', st.off[p] + ' ' + (p === 0 ? 'white' : 'red') + ' borne off'); }); $('p0').textContent = pip(st, 0); $('p1').textContent = pip(st, 1); drawDice(); } function autoSel() { var os = opts(), f = {}, list = []; os.forEach(function (m) { if (!f[m.f]) { f[m.f] = 1; list.push(m.f); } }); sel = list.length === 1 ? list[0] : -1; } function beginTurn(p, pre) { turn = p; dice = []; rolled = []; done = []; sel = -1; last = vsAI() ? last : []; needRoll = true; busy = false; if (vsAI()) { if (p === 1) { busy = true; draw(); say(pre + 'The computer is rolling...'); tmr = setTimeout(function () { roll(); }, 650); return; } } draw(); say(pre + (vsAI() ? 'Your turn. Press Roll dice.' : name(p) + ' to play. Press Roll dice.')); } function roll() { useDice(1 + qtRandInt(6), 1 + qtRandInt(6), ''); } function useDice(a, b, pre, op) { rolled = [a, b]; var rt = op ? '' : rollTxt() + ' '; dice = a === b ? [a, a, a, a] : [a, b]; needRoll = false; startSt = copy(st); startDice = dice.slice(); seqList = seqs(st, turn, dice); done = []; sel = -1; var any = seqList.length ? seqList[0].moves.length > 0 : false; if (!any) { busy = true; draw(); say(pre + rt + 'No legal move, so the turn passes.'); tmr = setTimeout(function () { busy = false; beginTurn(1 - turn, ''); }, 2000); return; } if (vsAI()) { if (turn === 1) { aiPlay(pre, rt); return; } } busy = false; if (turn === 0) { if (vsAI()) { last = []; } } autoSel(); draw(); say(pre + rt + 'Tap a highlighted checker, then a green spot.'); } function aiPlay(pre, rt) { busy = true; last = []; draw(); say(pre + rt + 'The computer is moving...'); var best = aiChoose(1), k = 0; function step() { if (best.moves.length > k) { var m = best.moves[k]; st = apply(st, 1, m); dice.splice(dice.indexOf(m.d), 1); last.push(m.f, m.t); k++; draw(); if (st.off[1] === 15) { busy = false; win(1); return; } tmr = setTimeout(step, 560); return; } busy = false; beginTurn(0, 'The computer moved (pink outline). '); } tmr = setTimeout(step, 750); } function win(p) { over = true; busy = false; var q = 1 - p, g = sgn(q), pts = 1, kind = '', i; if (st.off[q] === 0) { pts = 2; kind = ' with a gammon (2 points)'; var back = st.bar[q] > 0; for (i = 0; 24 > i; i++) { if (st.pts[i] * g > 0) { if (p === 0 ? 6 > i : i > 17) { back = true; } } } if (back) { pts = 3; kind = ' with a backgammon (3 points)'; } } score[p] += pts; $('s0').textContent = score[0]; $('s1').textContent = score[1]; draw(); say(vsAI() ? (p === 0 ? 'You win' + kind + '! \ud83c\udf89' : 'The computer wins' + kind + '. Try again!') : name(p) + ' wins' + kind + '! \ud83c\udf89'); } function doMove(m) { st = apply(st, turn, m); done.push(m); dice.splice(dice.indexOf(m.d), 1); sel = -1; if (st.off[turn] === 15) { win(turn); return; } if (!opts().length) { busy = true; draw(); say('Turn complete.'); tmr = setTimeout(function () { busy = false; beginTurn(1 - turn, ''); }, 800); return; } autoSel(); draw(); say('Moves left: ' + dice.join(', ') + '. Tap a highlighted checker.'); } function tap(i) { if (over || busy) { return; } if (!humanTurn()) { return; } if (needRoll) { say('Press Roll dice first.'); return; } var os = opts(); if (sel !== -1) { var hits = os.filter(function (m) { return m.f === sel ? m.t === i : false; }); if (hits.length) { hits.sort(function (x, y) { return x.d - y.d; }); doMove(hits[0]); return; } } if (os.some(function (m) { return m.f === i; })) { sel = sel === i ? -1 : i; draw(); return; } if (sel !== -1) { say('It cannot move there. Tap a green spot, or another highlighted checker.'); return; } say(st.bar[turn] > 0 ? 'You have a checker on the bar. Bring it back in first.' : 'That checker cannot move with these dice. Tap a highlighted checker.'); } function labels() { var ai = vsAI(); $('l0').textContent = ai ? 'Your points' : 'White points'; $('l1').textContent = ai ? 'Computer points' : 'Red points'; $('pl0').textContent = ai ? 'Your pip count' : 'White pip count'; $('pl1').textContent = ai ? 'Computer pip count' : 'Red pip count'; } function reset() { clearTimeout(tmr); st = { pts: [], bar: [0, 0], off: [0, 0] }; for (var i = 0; 24 > i; i++) { st.pts.push(0); } st.pts[23] = 2; st.pts[12] = 5; st.pts[7] = 3; st.pts[5] = 5; st.pts[0] = -2; st.pts[11] = -5; st.pts[16] = -3; st.pts[18] = -5; over = false; busy = false; sel = -1; last = []; done = []; seqList = []; dice = []; labels(); var a, b; do { a = 1 + qtRandInt(6); b = 1 + qtRandInt(6); } while (a === b); turn = a > b ? 0 : 1; needRoll = true; var pre = (vsAI() ? 'You rolled ' + a + ' and the computer rolled ' + b + '. ' : 'White rolled ' + a + ' and Red rolled ' + b + '. ') + name(turn) + (turn === 0 ? (vsAI() ? ' go first. ' : ' goes first. ') : ' goes first. '); if (turn === 1) { if (vsAI()) { busy = true; draw(); say(pre); tmr = setTimeout(function () { useDice(b, a, pre, true); }, 1600); return; } } useDice(turn === 0 ? a : b, turn === 0 ? b : a, pre, true); } function build(half, list) { list.forEach(function (x) { var el = document.createElement('div'); if (x === 'bar0' || x === 'bar1') { var p = x === 'bar0' ? 0 : 1; el.className = 'qbg-bar'; var stk = document.createElement('div'); stk.className = 'qbg-stk'; el.appendChild(stk); el.addEventListener('click', function () { if (p === turn) { tap(24); } }); barEl[p] = { el: el, stk: stk }; } else if (x === 'off0' || x === 'off1') { var q = x === 'off0' ? 0 : 1; el.className = 'qbg-off'; el.addEventListener('click', function () { if (q === turn) { tap(25); } }); offEl[q] = { el: el }; } else { el.className = 'qbg-pt'; var tri = document.createElement('div'); tri.className = 'qbg-tri ' + (x % 2 ? 'qbg-steel' : 'qbg-sand'); el.appendChild(tri); var no = document.createElement('span'); no.className = 'qbg-no'; no.textContent = x + 1; el.appendChild(no); var sk = document.createElement('div'); sk.className = 'qbg-stk'; el.appendChild(sk); el.addEventListener('click', function () { tap(x); }); ptEl[x] = { el: el, stk: sk }; } half.appendChild(el); }); } build($('top'), [12, 13, 14, 15, 16, 17, 'bar1', 18, 19, 20, 21, 22, 23, 'off1']); build($('bot'), [11, 10, 9, 8, 7, 6, 'bar0', 5, 4, 3, 2, 1, 0, 'off0']); $('roll').addEventListener('click', function () { if (over) { say('The game is over. Press New game to play again.'); return; } if (busy) { return; } if (!humanTurn()) { say('Wait for the computer to finish.'); return; } if (!needRoll) { say('You already rolled. ' + (dice.length ? 'Moves left: ' + dice.join(', ') + '.' : '')); return; } roll(); }); $('undo').addEventListener('click', function () { if (over || busy || needRoll || !humanTurn() || !done.length) { say(done.length ? 'You cannot undo now.' : 'Nothing to undo this turn.'); return; } st = copy(startSt); dice = startDice.slice(); done = []; autoSel(); draw(); say('Moves undone. ' + rollTxt()); }); $('new').addEventListener('click', reset); $('mode').addEventListener('change', function () { score = [0, 0]; $('s0').textContent = 0; $('s1').textContent = 0; reset(); }); reset(); }); })();<\/script>\n<div class=\"qt-next\"><p class=\"qt-next-h\">Play next<\/p><div class=\"qt-next-g\"><a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/checkers\/\">Checkers<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/mancala\/\">Mancala<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/reversi\/\">Reversi<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/solitaire\/\">Solitaire<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/dice-roller\/\">Dice Roller<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/gomoku\/\">Gomoku<\/a><\/div><\/div>\n<p><strong>Quick answer:<\/strong> Press <strong>Roll dice<\/strong>, tap a checker with a yellow outline, then tap a green spot to move it by one die. Each die is a separate move. You move your white checkers from point 24 down to point 1, into your home board at the bottom right. Once all 15 are home, move them off the board. The first player to bear off all checkers wins.<\/p>\n<h2>How to play Backgammon<\/h2>\n<ol>\n<li><strong>Start.<\/strong> Each player rolls one die. The higher roll goes first and uses both numbers.<\/li>\n<li><strong>Moving.<\/strong> On your turn, roll two dice and move checkers forward by each number. You can move one checker by both numbers or two checkers by one number each.<\/li>\n<li><strong>Doubles.<\/strong> If both dice show the same number, you move that number four times.<\/li>\n<li><strong>Blocked points.<\/strong> You cannot land on a point holding two or more of your opponent&#8217;s checkers.<\/li>\n<li><strong>Hitting.<\/strong> If you land on a point with just one opposing checker (a blot), it is hit and goes to the bar. A player with a checker on the bar must bring it back into the opponent&#8217;s home board before making any other move.<\/li>\n<li><strong>Bearing off.<\/strong> When all 15 of your checkers are in your home board, you can move them off with exact rolls. A higher number can bear off a checker from your highest occupied point.<\/li>\n<li><strong>Using the dice.<\/strong> You must use both dice if you can. If only one can be used, you must use the higher one when possible. If no move is possible, your turn passes.<\/li>\n<\/ol>\n<h2>Scoring: gammons and backgammons<\/h2>\n<table class=\"qt-ref\">\n<thead>\n<tr>\n<th>Result<\/th>\n<th>When<\/th>\n<th>Points<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Single win<\/td>\n<td>The loser has borne off at least one checker<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>Gammon<\/td>\n<td>The loser has not borne off any checkers<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>Backgammon<\/td>\n<td>A gammon, and the loser still has a checker on the bar or in the winner&#8217;s home board<\/td>\n<td>3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This version keeps a running points total across games. It does not use the doubling cube.<\/p>\n<h2>Backgammon strategy tips<\/h2>\n<ul>\n<li><strong>Make points in your home board.<\/strong> Two checkers together are safe and block your opponent. Your 5-point and 4-point are the most useful early.<\/li>\n<li><strong>Avoid leaving blots.<\/strong> A single checker within six points in front of an enemy checker is easy to hit.<\/li>\n<li><strong>Watch the pip count.<\/strong> The pip count shows how far each side still has to travel. If you are well ahead, race home. If you are behind, hold points and wait for a shot.<\/li>\n<li><strong>Build a prime.<\/strong> Six blocked points in a row trap your opponent&#8217;s checkers completely.<\/li>\n<\/ul>\n<p>More board games: <a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/checkers\/\">checkers<\/a>, <a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/mancala\/\">Mancala<\/a> and <a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/reversi\/\">Reversi<\/a>. Need real dice for another game? Use our <a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/dice-roller\/\">dice roller<\/a>.<\/p>\n<h2>FAQ<\/h2>\n<h3>Are the dice fair?<\/h3>\n<p>Yes. Each die is rolled with your browser&#8217;s secure random number generator, so every number from 1 to 6 is equally likely and the computer gets no special rolls.<\/p>\n<h3>Can I play Backgammon with a friend?<\/h3>\n<p>Yes. Choose <strong>Friend (2 players)<\/strong> and take turns on the same device. White moves to the bottom right and Red to the top right.<\/p>\n<h3>Can I take back a move?<\/h3>\n<p>Yes. Press <strong>Undo moves<\/strong> before your last move of the turn to start your turn again with the same dice.<\/p>\n<h3>How good is the computer?<\/h3>\n<p>Easy makes mostly random moves. Medium and hard judge each possible move by safety, blocking points and the race, and hard always picks its best move.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Play Backgammon free online against the computer or a friend. Roll the dice, move your 15 checkers around the board, hit your opponent&#8217;s single checkers, and be the first to bring all your checkers home and bear them off. Full rules, three computer levels, pip counts and undo are built in. Quick answer: Press Roll&#8230;<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":66148,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-70010","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/70010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=70010"}],"version-history":[{"count":0,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/70010\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/66148"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=70010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}