Me.halite_amount inconsistencies, Python


Anybody know why the line“me.halite_amount: {}.”.format(me.halite_amount))

Would output drastically different values when placed outside of the “for ship in me.get_ships():” loop?

It seems like if I place it inside, the value of me.halite_amount only ever counts down, it never includes the collected halite. If I place it outside the loop, it works as expected.



Sounds weird. You probablly should look through your code again. I am pretty sure there is no interactions between halite_amount and get_ships. Also halite_amount is updated only in one function which is called by Game.update_frame().