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

all: make comptime templates usable outside of vweb via $tmpl

This commit is contained in:
Alexander Medvednikov
2020-11-26 18:40:31 +01:00
parent c6a8c3cad5
commit 5efd393af2
7 changed files with 113 additions and 41 deletions

View File

@ -333,7 +333,7 @@ fn (g &Game) draw_tetro() {
fn (g &Game) draw_next_tetro() {
if g.state != .gameover {
idx := g.next_tetro_idx * tetro_size * tetro_size
next_tetro := g.tetros_cache[idx..idx + tetro_size]
next_tetro := g.tetros_cache[idx..idx + tetro_size].clone()
pos_y := 0
pos_x := field_width / 2 - tetro_size / 2
for i in 0 .. tetro_size {