-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnimal.hpp
42 lines (34 loc) · 1.17 KB
/
Animal.hpp
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
/******************************************************************************
** Animal Class Declaration File
** Author: Lauren "Ren" Demeis-Ortiz
** Date: 12/5/19
** Descriptions: This is the class declartion file for the Animal Class.
******************************************************************************/
#ifndef ANIMAL_HPP
#define ANIMAL_HPP
#include "Space.hpp"
#include <string>
// Animal Class Declarations
class Animal
{
protected:
int row; // Current Row Postion
int col; // Current Column Position
char avatar; // Appearance on board
std::string name; // Name of animal
public:
Animal() = default; // Default Constructor
virtual ~Animal() = default; // Use default destructor
void setRow(int);
void setCol(int);
void setName(std::string);
int getRow();
int getCol();
std::string getName();
char getAvatar();
// Dog changes state to asleep or awake, changes cat state to caught
virtual void changeState(Space*) = 0;
void move(Space* ptr, char direction, int numSpaces);
void updatePos(Space* ptr);
};
#endif