examples: fix dropping pieces with -autofree for tetris.v

pull/9349/head
Delyan Angelov 2021-03-17 14:45:32 +02:00
parent e8df8bc8c3
commit c2b574384f
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 1 additions and 1 deletions

View File

@ -321,7 +321,7 @@ fn (mut g Game) generate_tetro() {
// Get the right tetro from cache
fn (mut g Game) get_tetro() {
idx := g.tetro_idx * tetro_size * tetro_size + g.rotation_idx * tetro_size
g.tetro = g.tetros_cache[idx..idx + tetro_size]
g.tetro = g.tetros_cache[idx..idx + tetro_size].clone()
}
// TODO mut