1
0
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:
Alexander Medvednikov
2019-11-30 12:37:34 +03:00
parent b38283dcf1
commit 7e4799334f
5 changed files with 12 additions and 12 deletions

View File

@ -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
}