RhodesPeter / tic-tac-toe

Tic-tac-toe game.
https://rhodespeter.github.io/tic-tac-toe/
MIT License
0 stars 0 forks source link

Add tests for game.js, related #5 #14

Closed RhodesPeter closed 7 years ago

RhodesPeter commented 7 years ago

I've added tests to the functions that determine the next move of the computer so that I can refactor the game play (which is needed for #8) without introducing bugs.

Changes have been made to get_pattern_1_move(), get_pattern_2_move() and winner() functions. I've added arguments so that I can test in a functional/pure manner.