blob: 65201c462ad0df84965d0e0d54d4f6c606aa05c6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/**
* 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 <QGraphicsScene>
class Junk : public Robot {
public:
Junk();
Junk(Robot c);
~Junk() {}
/*
* Draws this junk onto the given QGraphicsScene.
*/
void draw(QGraphicsScene* scene) const override;
void moveTowards(const Unit& u) override {}
/*
* Junk can't attack in any direction.
*/
bool attacks(const Unit&) const override { return false; }
/*
* All junk is dead.
*/
bool alive() const override { return false; }
/*
* Polymorphic clone.
*/
Junk *clone() const override;
};
#endif // JUNK_H
|