August 2021
Intermediate to advanced
384 pages
9h 15m
English
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 ...
Read now
Unlock full access