This chapter did not really talk about the NextBlock game component and there is a reason for that. I want you to create it yourself. In the source code for this book the NextBlock class is empty and you have the task of filling it with life. The NextBlock game component is already added to the TetrisGrid class and you already saw all the available methods. If you are unsure about your solution you can check the complete source code with all the improvements and the full NextBlock class I made in the XNA Tetris full project source code, but I recommend you try coding the game component and maybe some other improvements to the game yourself to get more familiar with all the new classes.
The NextBlock component should show the next block type. Just use the BlockTypes enum from the TetrisGrid class and display the next block in a 5×5 grid and add a little text on top (see Figure 4-11).
Figure 4-11
A little tip: Don’t waste too much time playing Tetris. It is a great game, but you have more to come in this book.