summaryrefslogtreecommitdiffstats
path: root/labb4/GameState.cpp
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-11-10 01:35:03 +0100
committerGustav Sörnäs <gustav@sornas.net>2020-11-10 01:35:03 +0100
commit9cc46300dba5c1e53a26415507c4d08addfd89eb (patch)
tree65e69e4e69eda4b19c0c047dab466cf4b4b9e87e /labb4/GameState.cpp
parentfc151ff1e1c862f5b40dc028c293ce083695d78c (diff)
downloadtddd86-9cc46300dba5c1e53a26415507c4d08addfd89eb.tar.gz
warnings etc
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 {