Skip to content

Instantly share code, notes, and snippets.

@priort
Last active January 2, 2021 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save priort/ad68e8d141b67803af23c7dbba0f9289 to your computer and use it in GitHub Desktop.
Save priort/ad68e8d141b67803af23c7dbba0f9289 to your computer and use it in GitHub Desktop.
Tic-Tak-Toe-with-Action-Replay-Snippet-1
const tests = () => {
let testsPassed;
let gameboardWithNoCompletedRowsOrColumnsButAllCellsCompleted = [
['X','O', 'X'],
['O','O', 'X'],
['O','X', 'O']
]
testsPassed = !winChecker.thereIsAWinner(gameboardWithNoCompletedRowsOrColumnsButAllCellsCompleted);
console.log('Test thereIsAWinner gameboardWithNoCompletedRowsOrColumnsButAllCellsCompleted ' + testsPassed);
testsPassed = winChecker.gameBoardIsFull(gameboardWithNoCompletedRowsOrColumnsButAllCellsCompleted);
console.log('Test gameboardIsFull gameboardWithNoCompletedRowsOrColumnsButAllCellsCompleted ' + testsPassed);
let gameboardWithCompletedRow0 = [
['X','X', 'X'],
['O','O', 'X'],
['O','X', 'O']
]
....
....
....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment