summaryrefslogtreecommitdiffstats
path: root/labb4/GameState.h
diff options
context:
space:
mode:
Diffstat (limited to 'labb4/GameState.h')
-rw-r--r--labb4/GameState.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/labb4/GameState.h b/labb4/GameState.h
index ac749bb..dfd7ac5 100644
--- a/labb4/GameState.h
+++ b/labb4/GameState.h
@@ -24,25 +24,28 @@ public:
GameState(const GameState &other);
~GameState();
+ /*
+ * Copy assignment.
+ */
GameState &operator=(const GameState &other);
/*
- * Clear and redraw entire playing field
+ * Clear and redraw entire playing field.
*/
- void draw(QGraphicsScene* scene) const; // Clear and redraw entire playing field
+ void draw(QGraphicsScene* scene) const;
/*
- * Teleport hero to random location
+ * Teleport hero to random location.
*/
void teleportHero();
/*
- * Move robots one step towards hero
+ * Move robots one step towards hero.
*/
void moveRobots();
/* Count colliding robots.
- * Also converts robots to junk while checking collisions
+ * Also converts robots to junk while checking collisions.
*/
int countCollisions ();
@@ -59,21 +62,21 @@ public:
/*
* Can unit safely reside here?
*/
- bool isSafe (const Unit& unit) const; // Can unit safely reside here?
+ bool isSafe (const Unit& unit) const;
/*
- * Move hero towards dir
+ * Move hero towards dir.
*/
void moveHeroTowards (const Unit& dir);
/*
- * Return hero
+ * Return hero.
*/
Hero getHero () const;
private:
- std::vector<Robot *> robots; // the robots and the junk combined
- Hero hero; // the hero
+ std::vector<Robot *> robots; // the robots and the junk combined
+ Hero hero; // the hero
// private helpers
bool isEmpty(const Unit& unit) const;