-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCritter.h
51 lines (37 loc) · 1.17 KB
/
Critter.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
51
/****************************************************************************************************
* * Program name: CS162 Group Project
* * Group number: # 29
* * Group member: Taekyoung Kim, Zuhair Ahmed
* * Date: 02/10/2019
* * Description: This is Critter.h file for CS162 GroupProject
* * This project demonstrates a 2D simulation of Predator-Prey Game.
* * The board is a 2D array and each cell points to a Critter.
* * The board is a 2D array and each cell points to a Critter.
******************************************************************************************************/
#ifndef CRITTER_H
#define CRITTER_H
#include <iostream>
enum Type {ANT, DOODLEBUG};
class Critter {
private:
protected:
Type type;
int locX;
int locY;
int breedTime =0;
public:
Critter();
virtual ~Critter();
Critter(int x, int y, Type ty);
Type getType();
virtual void setType(Type ty);
virtual int getX() const;
virtual int getY()const;
virtual void setX(int x);
virtual void setY(int y);
virtual void move(Critter*** b)=0;
virtual void breed(Critter*** b)=0;
virtual bool starve() = 0;
bool moved =false;
};
#endif //CRITTER_H