Skip to content

Commit 8be309f

Browse files
committed
Update state-of-tic-tac-toe example
1 parent 83f0260 commit 8be309f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • exercises/practice/state-of-tic-tac-toe/.meta

‎exercises/practice/state-of-tic-tac-toe/.meta/proof.ci.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export const gamestate = (board) => {
2727
throw new Error('Wrong turn order: X went twice');
2828
case numberOfX - numberOfO < 0:
2929
throw new Error('Wrong turn order: O started');
30-
case scorringArray.includes(gridSize) && scorringArray.includes(-gridSize):
30+
case (scorringArray.includes(gridSize) && numberOfX === numberOfO) ||
31+
(scorringArray.includes(-gridSize) && numberOfX > numberOfO):
3132
throw new Error(
3233
'Impossible board: game should have ended after the game was won',
3334
);

0 commit comments

Comments
 (0)