-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCANIMAL.h
84 lines (76 loc) · 1.26 KB
/
CANIMAL.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#pragma once
#include <stdio.h>
#include <conio.h>
#include<ctime>
#include "windows.h"
#include <iostream>
#include <string>
#include "CPEOPLE.h"
using namespace std;
#define KEY_NONE -1
class CANIMAL
{
protected:
int aX, aY;
bool aState;
bool right;
public:
virtual void Draw(int, int) = 0;
virtual void Delete(int, int) = 0;
virtual ~CANIMAL();
void Move(int, int);
int Get_aX();
int Get_aY();
bool Get_aState();
void Set_aState(bool);
void Set_aX(int);
void Set_aY(int);
CANIMAL();
void SetColor(WORD);
void gotoXY(int, int);
void ShowCur(bool);
void textcolor(int);
};
class TRex : public CANIMAL
{
public:
void Draw(int, int);
void Delete(int, int);
~TRex();
TRex();
};
class Buffalo : public CANIMAL
{
public:
void Draw(int, int);
void Delete(int, int);
~Buffalo();
Buffalo();
};
class Pokemon : public CANIMAL
{
string body[4];
public:
void Draw(int, int);
void Delete(int, int);
~Pokemon();
Pokemon();
};
class Dog : public CANIMAL
{
string body[4];
public:
void Draw(int, int);
void Delete(int, int);
~Dog();
Dog();
};
class Turtle : public CANIMAL
{
string body[4];
public:
void Draw(int, int);
void Delete(int, int);
~Turtle();
Turtle();
};