summaryrefslogtreecommitdiffstats
path: root/labb4/Junk.cpp
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-11-10 00:34:54 +0100
committerGustav Sörnäs <gustav@sornas.net>2020-11-10 00:34:54 +0100
commitb92072fc45676f9fe4669905f38a2aa3d6b92c4d (patch)
tree93abd1a0090433432febfa6b7cc20163ba5c08cc /labb4/Junk.cpp
parent6a72f2f15c9f39b2a851b955b9b87abede8d0257 (diff)
downloadtddd86-b92072fc45676f9fe4669905f38a2aa3d6b92c4d.tar.gz
vector<Robot *>, bool alive(), correct inheritance
Diffstat (limited to 'labb4/Junk.cpp')
-rw-r--r--labb4/Junk.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/labb4/Junk.cpp b/labb4/Junk.cpp
index 8686129..fc0edfe 100644
--- a/labb4/Junk.cpp
+++ b/labb4/Junk.cpp
@@ -15,7 +15,7 @@ void Junk::draw(QGraphicsScene *scene) const {
JUNK_RADIUS, JUNK_RADIUS), QPen(), QBrush(JUNK_COLOR));
}
-void Junk::moveTowards(const Unit& u) const {}
+void Junk::moveTowards(const Unit& u) {}
bool Junk::attacks(const Unit& u) const {
return false;
@@ -24,3 +24,7 @@ bool Junk::attacks(const Unit& u) const {
unsigned int Junk::getCollisionCount() const {
return 1;
};
+
+bool Junk::alive() const {
+ return false;
+}