add sandbox and lock input in other levels

This commit is contained in:
Crispy 2024-10-07 12:21:57 +02:00
parent bbe5ab0868
commit af66e68c5f
6 changed files with 21 additions and 2 deletions

View file

@ -197,7 +197,7 @@ impl Board {
self.rows = new_rows;
self.offset_y += len as isize;
self.height += len;
} else if p.y as usize > self.height {
} else if p.y as usize >= self.height {
let new_height = p.y as usize + 1;
self.rows.resize(new_height, vec![Tile::Blank; self.width]);
self.height = new_height;