1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

examples: fix tetris

This commit is contained in:
Alexander Medvednikov 2019-08-22 22:28:27 +03:00
parent eb5fcafa77
commit abe61e28fe

View File

@ -317,7 +317,7 @@ fn (g &Game) draw_field() {
}
}
fn (g &Game) draw_score() {
fn (g mut Game) draw_score() {
if g.font_loaded {
g.ft.draw_text(1, 2, 'score: ' + g.score.str(), text_cfg)
if g.state == .gameover {
@ -330,7 +330,7 @@ fn (g &Game) draw_score() {
}
}
fn (g &Game) draw_scene() {
fn (g mut Game) draw_scene() {
g.draw_tetro()
g.draw_field()
g.draw_score()