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.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'labb4/Robot.cpp') 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; +} -- cgit v1.2.1