diff --git a/Games/Color_Turner/index.html b/Games/Color_Turner/index.html index 69511b4bab..6264620660 100644 --- a/Games/Color_Turner/index.html +++ b/Games/Color_Turner/index.html @@ -13,7 +13,7 @@ font-size: 30px; ">
New Game
-
Moves 0 / 35
+
Moves 0 / 20
@@ -36,7 +36,7 @@ let cell = '-x' let skill = 5 let tally = 0 - let cap = 35 + let cap = 20 let color // game play methods @@ -53,10 +53,11 @@ return n < 10 ? shuffle(collection).slice(0, n) : collection } - let checkWin = (moves) => { + let checkWin = () => { + moves.innerText = tally let n = 0 let msg = '' - if (moves <= cap) { + if (tally <= cap) { if (board.childNodes[99].className.indexOf(cell) > -1) { for (var i = 0; i < 100; i++) { if (board.childNodes[i].className.indexOf(cell) > -1) { @@ -68,7 +69,7 @@ if (n === 100) { msg = 'You Win!' running = false - } else if (n < 100 && moves >= cap) { + } else if (n < 100 && tally >= cap) { msg = 'Oops! Try Again...' running = false } @@ -132,9 +133,8 @@ board.className = 'started' } tally++ - //? checkColor(chip) - checkWin(tally) + checkWin() } }