From 6a72f2f15c9f39b2a851b955b9b87abede8d0257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 9 Nov 2020 22:12:41 +0100 Subject: initial work --- labb4/Junk.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 labb4/Junk.h (limited to 'labb4/Junk.h') diff --git a/labb4/Junk.h b/labb4/Junk.h new file mode 100644 index 0000000..a4d6cca --- /dev/null +++ b/labb4/Junk.h @@ -0,0 +1,29 @@ +/** + * Copyright (C) David Wolfe, 1999. All rights reserved. + * Ported to Qt and adapted for TDDD86, 2015. + */ + +#ifndef JUNK_H +#define JUNK_H + +#include "Robot.h" +#include + +class Junk : public Robot { +public: + Junk(); + Junk(Robot c); + + /* + * Draws this junk onto the given QGraphicsScene. + */ + void draw(QGraphicsScene* scene) const; + + void moveTowards(const Unit& u) const; + + bool attacks(const Unit& u) const; + + unsigned int getCollisionCount() const; +}; + +#endif // JUNK_H -- cgit v1.2.1