summaryrefslogtreecommitdiffstats
path: root/labb4/GameState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'labb4/GameState.cpp')
-rw-r--r--labb4/GameState.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/labb4/GameState.cpp b/labb4/GameState.cpp
index 3d7b8b7..6de11dd 100644
--- a/labb4/GameState.cpp
+++ b/labb4/GameState.cpp
@@ -42,7 +42,7 @@ void GameState::teleportHero() {
}
void GameState::moveRobots() {
- for (unsigned int i = 0; i < robots.size(); i++) {
+ for (int i = 0; i < robots.size(); i++) {
robots[i]->moveTowards(hero);
}
}
@@ -60,20 +60,6 @@ int GameState::countCollisions() {
}
}
return numberDestroyed;
-
- //int numberDestroyed = 0;
- //unsigned int i = 0;
- //while (i < robots.size()) {
- // bool hitJunk = junkAt (robots[i]);
- // bool collision = (countRobotsAt (robots[i]) > 1);
- // if (hitJunk || collision) {
- // if (!hitJunk) junks.push_back (Junk(robots[i]));
- // robots[i] = robots[robots.size()-1];
- // robots.pop_back();
- // numberDestroyed++;
- // } else i++;
- //}
- //return numberDestroyed;
}
bool GameState::anyRobotsLeft() const {