-
Notifications
You must be signed in to change notification settings - Fork 1
/
h_EatableItem.h
executable file
·50 lines (32 loc) · 1.07 KB
/
h_EatableItem.h
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
42
43
44
45
46
47
48
49
50
#ifndef H_EATABLEITEM_H
#define H_EATABLEITEM_H
class QPointF;
#include "h_Item.h"
class h_EatableItem : public h_Item
{
public:
h_EatableItem(Settings* settings, h_Simulation* aSimulation, qreal aRadius);
h_EatableItem(Settings* settings, h_Simulation* aSimulation, qreal aRadius, QPointF* ppt);
void setIsEaten(bool var) {isEaten = var;}
bool getIsEaten() {return isEaten;}
/*virtual*/ void reset(qreal _x, qreal _y, int _angle);
protected:
bool isEaten;
};
class h_Food : public h_EatableItem
{
public:
h_Food(Settings* settings, h_Simulation* aSimulation, qreal aRadius);
h_Food(Settings* settings, h_Simulation* aSimulation, qreal aRadius, QPointF* ppt);
void reset();
/*virtual*/ bool isFood() const {return true;}
};
class h_Poison : public h_EatableItem
{
public:
h_Poison(Settings* settings, h_Simulation* aSimulation, qreal aRadius);
h_Poison(Settings* settings, h_Simulation* aSimulation, qreal aRadius, QPointF* ppt);
void reset();
/*virtual*/ bool isPoison() const {return true;}
};
#endif // H_EATABLEITEM_H