end of game logic broken, getting some negative numbers in pits