Hey guys just a little help required, I’ve been stuck developing my code recently and I am not sure what is causing a crash at round 2, but here is the error spots.
Removing defense from certain locations for attack path.
remove_block = [[27, 13], [26, 13]]
if (game_state.get_resource(game_state.BITS, 0) >= 9):
gamelib.game_state.GameState.attempt_remove(
self, locations=[[27, 13], [26, 13]])
return
Rebuild broken filters into destructors.
activate_list = [[0, 13], [1, 13], [2, 13], [
3, 12], [4, 11], [5, 10], [6, 9], [22, 10], [23, 11], [
24, 12], [25, 13]]
for location in activate_list:
if game_state.contains_stationary_unit(location):
not_destroyed = [[0, 13], [1, 13], [2, 13], [
3, 12], [4, 11], [5, 10], [6, 9], [22, 10], [23, 11], [
24, 12], [25, 13]]
destroyed = []
for location in not_destroyed:
if not game_state.contains_stationary_unit(location):
destroyed.append(location)
return destroyed
for location in destroyed:
if game_state.can_spawn(DESTRUCTOR, location):
game_state.attempt_spawn(DESTRUCTOR, location)
P.S. feel free to use my code and any help would be appreciated; thank you so much!