From b92072fc45676f9fe4669905f38a2aa3d6b92c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Tue, 10 Nov 2020 00:34:54 +0100 Subject: vector, bool alive(), correct inheritance --- labb4/Robot.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'labb4/Robot.h') diff --git a/labb4/Robot.h b/labb4/Robot.h index 9e2c075..8b445dc 100644 --- a/labb4/Robot.h +++ b/labb4/Robot.h @@ -12,9 +12,13 @@ class Robot : public Unit { public: Robot(); - void draw(QGraphicsScene* scene) const; + virtual void draw(QGraphicsScene* scene) const; + + virtual void moveTowards(const Unit& u); virtual unsigned int getCollisionCount() const; + + virtual bool alive() const; }; #endif // ROBOT_H -- cgit v1.2.1