You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line 109-113 of the 04_game_spec asks that the won? method ''returns the correct winning combination in the case of a win''.
Board originally has two winners down the middle (Os) and the right side (Xs).
game.board.cells =
["X", "O", "X",
"O", "O", "X",
"O", "O", "X"]
Winning combos would be either [1,4,7] or [2,5,8]. So either could be returned as the winner depending on the order the combo. I had to move [2,5,8] ahead of [1,4,7] in WIN_COMBINATIONS definition to get it to pass.
It can be changed to game.board.cells =
["X", "O", "X",
"O", "O", "X",
" ", " ", "X"]
The text was updated successfully, but these errors were encountered:
Line 109-113 of the 04_game_spec asks that the won? method ''returns the correct winning combination in the case of a win''.
Board originally has two winners down the middle (Os) and the right side (Xs).
game.board.cells =
["X", "O", "X",
"O", "O", "X",
"O", "O", "X"]
Winning combos would be either [1,4,7] or [2,5,8]. So either could be returned as the winner depending on the order the combo. I had to move [2,5,8] ahead of [1,4,7] in WIN_COMBINATIONS definition to get it to pass.
It can be changed to game.board.cells =
["X", "O", "X",
"O", "O", "X",
" ", " ", "X"]
The text was updated successfully, but these errors were encountered: