Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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