all: fix unused variable warnings

pull/4865/head
yuyi 2020-05-12 19:57:23 +08:00 committed by GitHub
parent 99b31d8241
commit f33de1bc64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ sys := &System {arr_momentum(), arr_position()}
offsetmomentum(mut sys)
println('${energy(sys):.9f}') //-0.169075164
for i in 0..50000000 {
for _ in 0..50000000 {
advance(mut sys, 0.01)
}
println('${energy(sys):.9f}') //-0.169059907

View File

@ -189,7 +189,7 @@ fn (g mut Game) init_game() {
g.generate_tetro()
g.field = [] // TODO: g.field = [][]int
// Generate the field, fill it with 0's, add -1's on each edge
for i in 0..FieldHeight + 2 {
for _ in 0..FieldHeight + 2 {
mut row := [0].repeat(FieldWidth + 2)
row[0] = - 1
row[FieldWidth + 1] = - 1