Skip to content

Commit

Permalink
Fix isRowComplete
Browse files Browse the repository at this point in the history
  • Loading branch information
wvanheemstra committed Dec 23, 2024
1 parent 4f17c12 commit 670ed9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion containers/app/frontend/src/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function IsVictory (cells) {

const isRowComplete = row => {
const symbols = row.map(i => cells[i])
return symbols.every(i => i !== null && i === true)
return symbols.every(i => i !== null && i === symbols[0])
}

return positions.map(isRowComplete).some(i => i === true)
Expand Down

0 comments on commit 670ed9f

Please sign in to comment.