diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2011-11-28 10:32:59 +0100 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2011-11-28 10:32:59 +0100 |
commit | c1f09153400fe7997b6c299484e01a13a4bfc6a4 (patch) | |
tree | d19fbfb2719b98a28fb4675944697bcb420f38a2 /Game.cpp | |
parent | 9e143d98572569145ce03f25eec7e778be23a7af (diff) |
kill the player we ran into as well..
Diffstat (limited to 'Game.cpp')
-rw-r--r-- | Game.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -60,6 +60,9 @@ void Game::updateGame(uint timeElapsedMs) { if (cell.getState()) {
player.kill();
cell.setState(BOOM);
+ if (cell.getState() % 2 == 0) { // it's a player itself
+ (getPlayerByID(cell.getState()/2)).kill();
+ }
} else {
cell.setState(player.getNumber()*2+1);
}
|