diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2020-11-10 14:57:44 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2020-11-10 14:57:44 +0100 |
| commit | 00b84ef1485204e03395e7c90634bc7de16cd9fb (patch) | |
| tree | af7c08bba9908d61d6076a93ee7a2c83773f201d /labb4/Robot.h | |
| parent | 01862f6b40c0f8fbc0123f1ac5140a406c268251 (diff) | |
| download | tddd86-00b84ef1485204e03395e7c90634bc7de16cd9fb.tar.gz | |
comments and cleanup
Diffstat (limited to 'labb4/Robot.h')
| -rw-r--r-- | labb4/Robot.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/labb4/Robot.h b/labb4/Robot.h index 6f68e9b..224b742 100644 --- a/labb4/Robot.h +++ b/labb4/Robot.h @@ -15,12 +15,19 @@ public: virtual ~Robot() {}; virtual void draw(QGraphicsScene* scene) const; - virtual void moveTowards(const Unit& u); - - virtual unsigned int getCollisionCount() const; - - virtual bool alive() const; - + /* + * Take one step closer to u. + */ + virtual void moveTowards(const Unit& u) override; + + /* + * All robots are alive. + */ + virtual bool alive() const { return true; }; + + /* + * Polymorphic clone. + */ virtual Robot *clone() const; }; |
