18.1.3 Text

You still need two more positions: scorePos and levelPos. For the position of the score, blockPos will be used as a starting point. Subtract SQUARE_SIZE four times of the vertical value. Now you need the position to draw the level. Start from the score position, and subtract another square.

Once you’ve done that, you are ready to draw the score on the screen. Right now, it will suffice to show a random text. The real score will be added later. Besides, a special font is supplied with this template project. You will find it in gui tetrisFont tetris Style. If you do not know how to customize the look of text, you can review Chapter 3.4.

Test your application when you’re done.