bippity / Parachute

Simplified version of Apple's "Sabotage" game
0 stars 0 forks source link

Concurrent Modification Exception when dying #3

Closed bippity closed 9 years ago

bippity commented 9 years ago

Telling a paratrooper to die in Entities class' move() method causes this exception. Manually removing the paratrooper from queue via spacebar doesn't cause any error.

bippity commented 9 years ago

Currently they can only die by falling https://github.com/bippity/Parachute/blob/test/src/Entities.java#L212

And should remove the Entity from queue via update method https://github.com/bippity/Parachute/blob/test/src/GameComponent.java#L56

bippity commented 9 years ago

Fixed here https://github.com/bippity/Parachute/commit/9536fdd2be0c018cc4e4e068664d7ee505446927#diff-01bac26ae9b9152f9c533250f852f416R26