January 2018
Beginner to intermediate
454 pages
10h 8m
English
The biggest required change will be the level handling. You need to create an array with different times to increase the tetrimino's speed of descent and to check whether the level needs to be changed or not (based on the number of lines).
The score will be updated in the following cases:
Let's start with the easiest change—the score.
First, let's add the following method into our Tetris type:
fn update_score(&mut self, to_add: u32) { self.score += to_add; }
We can suppose that no additional explanations are required here.
Next, let's update a few methods:
fn check_lines(&mut self) { let mut ...
Read now
Unlock full access