22 Tic-Tac-Toe redux: An interactive version with type hints

In this last exercise, we’re going to revisit the Tic-Tac-Toe game from the previous chapter. That version played one turn of the game by accepting an initial --board and then modifying it if there were also valid options for --player and --cell. It printed the one board and the winner, if any. We’re going to extend those ideas into a version that will always start from an empty board and will play as many turns as needed to complete a game, ending with a winner or a draw.

This program will be different from all the other programs in this book because it will accept no command-line ...

Get Tiny Python Projects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.