Let’s add some more features to the Darkanoid game. Now that you’ve learned how collision testing works and have seen some example code, I think you’ll be able to add this new capability to Darkanoid very easily. The new collision code in the game will make it possible to deflect the ball using the paddle (although you still can’t “lose” by missing the ball—yet). The ball also hits blocks and makes them disappear. This is done by simply setting the blockData array value to zero whenever a block is destroyed. Then, next time through the game loop, that particular block is not drawn. The new changes definitely help this game feel more functional, as you can see in Figure 12.8.