File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ fn (mut g Game) init_game() {
180180 g.field = []
181181 // Generate the field, fill it with 0's, add -1's on each edge
182182 for _ in 0 .. field_height + 2 {
183- mut row := [0 ]. repeat ( field_width + 2 )
183+ mut row := [] int {len: field_width + 2 }
184184 row[0 ] = - 1
185185 row[field_width + 1 ] = - 1
186186 g.field << row.clone ()
@@ -392,10 +392,10 @@ fn (mut g Game) draw_scene() {
392392
393393fn parse_binary_tetro (t_ int ) []Block {
394394 mut t := t_
395- mut res := [Block{}]. repeat ( 4 )
395+ mut res := [] Block{len: 4 }
396396 mut cnt := 0
397397 horizontal := t == 9 // special case for the horizontal line
398- ten_powers := [1000 , 100 , 10 , 1 ]
398+ ten_powers := [1000 , 100 , 10 , 1 ]!
399399 for i := 0 ; i < = 3 ; i++ {
400400 // Get ith digit of t
401401 p := ten_powers[i]
You can’t perform that action at this time.
0 commit comments