mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples: fix compilation of game_of_life due to type mismatch
This commit is contained in:
parent
0970e61350
commit
b52c98ac43
@ -46,8 +46,9 @@ fn new_automaton(f [][]int) Automaton {
|
||||
maxx = f[y].len
|
||||
}
|
||||
}
|
||||
field := &A2D{ maxx: maxx maxy: maxy data: &int( vcalloc( sizeof(int) * maxy * maxx ) ) }
|
||||
new_field := &A2D{ maxx: maxx maxy: maxy data: &int( vcalloc( sizeof(int) * maxy * maxx ) ) }
|
||||
size := u32(maxx * maxy)
|
||||
field := &A2D{ maxx: maxx maxy: maxy data: &int( vcalloc( sizeof(int) * size ) ) }
|
||||
new_field := &A2D{ maxx: maxx maxy: maxy data: &int( vcalloc( sizeof(int) * size) ) }
|
||||
for y in 0..field.maxy {
|
||||
for x in 0..field.maxx {
|
||||
field.set( x, y, f[y][x] )
|
||||
|
Loading…
Reference in New Issue
Block a user