File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
tool/rlc/test/examples/space_hulk Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -146,11 +146,11 @@ ent Board:
146
146
let x = self.units.get(0).x
147
147
let y = self.units.get(0).y
148
148
let original_distance = manhattan_distance(22, 2, 5, 13)
149
- let current_distance = manhattan_distance(x.value, 22 , y.value, 5 )
149
+ let current_distance = manhattan_distance(x.value, 21 , y.value, 4 )
150
150
if original_distance > current_distance:
151
- return 0.9 - (float(current_distance) / 30.0) + (float(self.gsc_killed.value) / 10.0)
151
+ return ( 0.9 - (float(current_distance) / 30.0) ) + (float(self.gsc_killed.value) / 10.0)
152
152
if original_distance < current_distance:
153
- return -0.4 - (float(current_distance) / 30.0) + (float(self.gsc_killed.value) / 10.0)
153
+ return ( -0.4 - (float(current_distance) / 30.0) ) + (float(self.gsc_killed.value) / 10.0)
154
154
return + (float(self.gsc_killed.value) / 10.0)
155
155
156
156
fun manhattan_distance(Int x1, Int x2, Int y1, Int y2) -> Int:
Original file line number Diff line number Diff line change @@ -138,7 +138,12 @@ fun gen_printer_parser():
138
138
139
139
fun main() -> Int:
140
140
let state = play()
141
- print_indented(state)
141
+ let x : UnitArgType
142
+ x = 0
143
+ let gs : UnitArgType
144
+ gs = 1
145
+ let m : DirectionArgType
146
+ m.value = Direction::right.value
142
147
state.shoot(x, gs)
143
148
state.quit()
144
149
state.quit()
@@ -244,7 +249,9 @@ fun main() -> Int:
244
249
state.end_move()
245
250
state.quit()
246
251
state.quit()
252
+ print_indented(state)
247
253
state.board.pretty_print_board()
254
+ print(state.board.score())
248
255
return int(state.is_done()) - 1
249
256
250
257
fun test_enumerate() -> Bool:
You can’t perform that action at this time.
0 commit comments