4.6Challenge: Create nextblock game components
This chapter has not really discussed Nextblock There is a reason to do this because I want you to create it yourself. In this bookSource codeMedium, Nextblock Class is empty, and your task is to fill it and run it. In this game, Nextblock Game components have been added Tetrisgrid Class, you have seen all the methods. If you have any questions when implementing your own method, you can view XNa Tetris Project SourceCodeIn Nextblock Class and make some improvements. However, I suggest you try to write this component or make some other improvements to better familiarize yourself with how these new classes are used.
Nextblock The component should be able to display the next block type to be displayed. Use Tetrisgrid Class Blocktypes Enumeration, placing the next square in 5 × 5 And add some text ( 4-11 ).
Figure4-11
Tip: although this is a great game, do not waste too much time playing it, because there are more fun games waiting for you.