-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCritter.cpp
58 lines (43 loc) · 1.11 KB
/
Critter.cpp
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
52
53
54
55
56
57
58
/****************************************************************************************************
* * Program name: CS162 Group Project
* * Group number: # 29
* * Group member: Taekyoung Kim, Zuhair Ahmed
* * Date: 02/10/2019
* * Description: This is Critter.cpp file for CS162 GroupProject
* * This project demonstrates a 2D simulation of Predator-Prey Game.
******************************************************************************************************/
#include "Critter.h"
//default constructor
Critter::Critter() =default;
//default destructor
Critter::~Critter()=default;
//Constructor
Critter::Critter(int x, int y, Type ty){
this->locX =x;
this->locY = y;
this->type = ty;
}
//Accessor for Type
Type Critter::getType() {
return this->type;
}
//Modifier for Type
void Critter::setType(Type tp){
type = tp;
}
//Accessor for locX
int Critter::getX() const{
return this->locX;
}
//Modifier for locX
void Critter::setX(int x) {
locX = x;
}
//Accessor for locY
int Critter::getY() const {
return this->locY;
}
//Modifier for locY
void Critter::setY(int y){
locY = y;
}