Let's start with the UI rendering first and then add the font management in order to display the game information in real time.
Getting started with game mechanisms
Rendering UI
With the current code base, very few changes are required in order to be able to have a fully working Tetris.
Rendering initialization
For now, the main function is very small. First, let's add the following lines at the top of the function:
let sdl_context = sdl2::init().expect("SDL initialization
failed"); let video_subsystem = sdl_context.video().expect("...