mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples: fix dropping pieces with -autofree for tetris.v
This commit is contained in:
parent
e8df8bc8c3
commit
c2b574384f
@ -321,7 +321,7 @@ fn (mut g Game) generate_tetro() {
|
|||||||
// Get the right tetro from cache
|
// Get the right tetro from cache
|
||||||
fn (mut g Game) get_tetro() {
|
fn (mut g Game) get_tetro() {
|
||||||
idx := g.tetro_idx * tetro_size * tetro_size + g.rotation_idx * tetro_size
|
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
|
// TODO mut
|
||||||
|
Loading…
Reference in New Issue
Block a user