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:
146146 let x = self.units.get(0).x
147147 let y = self.units.get(0).y
148148 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 )
150150 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)
152152 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)
154154 return + (float(self.gsc_killed.value) / 10.0)
155155
156156fun 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():
138138
139139fun main() -> Int:
140140 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
142147 state.shoot(x, gs)
143148 state.quit()
144149 state.quit()
@@ -244,7 +249,9 @@ fun main() -> Int:
244249 state.end_move()
245250 state.quit()
246251 state.quit()
252+ print_indented(state)
247253 state.board.pretty_print_board()
254+ print(state.board.score())
248255 return int(state.is_done()) - 1
249256
250257fun test_enumerate() -> Bool:
You can’t perform that action at this time.
0 commit comments