diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2020-11-10 00:34:54 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2020-11-10 00:34:54 +0100 |
| commit | b92072fc45676f9fe4669905f38a2aa3d6b92c4d (patch) | |
| tree | 93abd1a0090433432febfa6b7cc20163ba5c08cc /labb4/Robot.cpp | |
| parent | 6a72f2f15c9f39b2a851b955b9b87abede8d0257 (diff) | |
| download | tddd86-b92072fc45676f9fe4669905f38a2aa3d6b92c4d.tar.gz | |
vector<Robot *>, bool alive(), correct inheritance
Diffstat (limited to 'labb4/Robot.cpp')
| -rw-r--r-- | labb4/Robot.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/labb4/Robot.cpp b/labb4/Robot.cpp index f7d96e0..f25c101 100644 --- a/labb4/Robot.cpp +++ b/labb4/Robot.cpp @@ -14,6 +14,14 @@ void Robot::draw(QGraphicsScene *scene) const { JUNK_RADIUS, JUNK_RADIUS), QPen(), QBrush(ROBOT_COLOR)); } +void Robot::moveTowards(const Unit& u) { + Unit::moveTowards(u); +} + unsigned int Robot::getCollisionCount() const { return 1; }; + +bool Robot::alive() const { + return true; +} |
