ThalesGroup / kessler-game

Kessler is a simulation environment loosely modeled after our internal project PsiBee and the external project Fuzzy Asteroids. The game has ships that shoot bullets at asteroids to gain score. Ships can collide with asteroids and other ships and lose lives.
https://github.com/ThalesGroup/kessler-game
Apache License 2.0
8 stars 5 forks source link

BUG: Ship 1 shields ship 2 from mine blast #48

Closed Jie-F closed 6 months ago

Jie-F commented 6 months ago

In the collision check loop, if the first ship collides with the mine, it breaks out of the for loop, so the second ship doesn't get checked for collisions with the mine. The result is that if two ships are caught in the blast of a mine, ship 1 will take damage while ship 2 does not take damage, which is unexpected behavior and an unfair advantage for ship 2.

The fix is to remove the break statement

image