Reworked the tests to play every possible move by the human player. Some of the code in DTIGameBoard needed by refactored for this, mainly to make each game board immutable—it now represents just one state. The test is not exactly accurate yet as it won’t play every single computer move—just the first selected. This will need to be changed so that all possible computer moves are played, not just one picked at random.
Removed rules-based approach, and removed use of [DTIPlayer unplayed], replacing it with [NSNull null]. Currently broken
- Implementation of minimax that uses a DTIPossibleMove class to pass back the best score and the move that caused that score.
- Got rid of the static DTIPlayer instances, and the player is now responsible for making its own move.
Removed unused code
Changed some method names, switched around some code to simplify and fixed GameTests
Renamed method
Remove lastPlayedSquare from DTIGameBoar, instead calculate it at the time it’s play
Removed storage of DTIPlayer on the DTIGameBoard object
Memorize already computed paths
Added in rotations (needs to be renamed)
Merge branch 'master' of https://github.com/DanielIrvine/TicTacToe