Thus far our TicTacToe game has been a two player game. In this lesson we refactor our code in order to support a single player mode. A very simple algorithm takes over as player two, alternating turns between it and the human player.
Here we return to unit testing with GUT. We add tests as we go to give us better confidence in the validity of our code.
❤️ Enjoyed this video? Subscribe to our channel and hit the notification bell to never miss a new video - and let us know what how-tos you'd like to see next in the comments!
-------------------------
Chapters ⌛
00:00 - Intro
00:25 - Making a plan for adding a computer opponent
02:44 - Implementing get_empty_tiles using test driven development
04:54 - Creating the computer opponent class
06:14 - Refactor game piece holder class
08:38 - Testing the game play in single and two player modes
09:08 - Outro and new lesson highlights