11 Connect Four
In this chapter, you’ll build a voice-controlled Connect Four game. As with tic-tac-toe in Chapter 10, you’ll first draw the board and set the yellow and red game pieces to alternate turns. You’ll animate the effect of a disc falling from the top of a column to the lowest available row to make the game more visually engaging. You’ll disallow invalid moves, detect if a player has won, and detect if all 42 cells have been occupied with no winner, meaning the game is tied.
In Chapter 10, you learned how to check whether a player has won the game by laying out all winning scenarios and checking whether the current game board ...
Get Make Python Talk 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.