mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
array: make left/right/slice private
This commit is contained in:
@ -289,7 +289,7 @@ fn (g mut Game) generate_tetro() {
|
||||
// Get the right tetro from cache
|
||||
fn (g mut Game) get_tetro() {
|
||||
idx := g.tetro_idx * TetroSize * TetroSize + g.rotation_idx * TetroSize
|
||||
g.tetro = g.tetros_cache.slice(idx, idx + TetroSize)
|
||||
g.tetro = g.tetros_cache[idx..idx+TetroSize]
|
||||
}
|
||||
|
||||
// TODO mut
|
||||
@ -403,7 +403,7 @@ fn key_down(wnd voidptr, key, code, action, mods int) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if game.state != .running {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user