summaryrefslogtreecommitdiffstats
path: root/Game.cpp
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2011-11-28 10:32:59 +0100
committerDominique Martinet <asmadeus@codewreck.org>2011-11-28 10:32:59 +0100
commitc1f09153400fe7997b6c299484e01a13a4bfc6a4 (patch)
treed19fbfb2719b98a28fb4675944697bcb420f38a2 /Game.cpp
parent9e143d98572569145ce03f25eec7e778be23a7af (diff)
kill the player we ran into as well..
Diffstat (limited to 'Game.cpp')
-rw-r--r--Game.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Game.cpp b/Game.cpp
index f1fd340..5054c6f 100644
--- a/Game.cpp
+++ b/Game.cpp
@@ -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);
}