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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.