December 2016
Intermediate to advanced
376 pages
9h 5m
English

This chapter features a Tic-Tac-Toe game. Tic-Tac-Toe is normally played with two people. One player is X and the other player is O. Players take turns placing their X or O. If a player gets three of their marks on the board in a row, column, or diagonal, they win. When the board fills up with neither player winning, the game ends in a draw.
This chapter doesn’t introduce many new programming concepts. The user will play against a simple artificial intelligence, which we will write using our existing programming knowledge. An artificial intelligence (AI) is a computer program that can intelligently respond to the player’s moves. ...