-
Notifications
You must be signed in to change notification settings - Fork 0
/
character.h
51 lines (39 loc) · 1015 Bytes
/
character.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
#ifndef __CHARACTER_H
#define __CHARACTER_H
#include <vector>
#include <d3d9.h>
#include "common.h"
#include "image.h"
#include "bar.h"
class Square;
using namespace std;
class Character{
private:
const Location dest;
int num;
Location loc;
IDirect3DTexture9* texture_;
vector<Location> moveableList;
int numMoveable;
public:
Character();
Character(int, Location, Location, IDirect3DTexture9*);
~Character();
void Draw() const;
void Move(Square*);
bool Check() const;
bool Check(Location) const;
void SearchMoveable();
void RevealMoveable() const;
void HideMoveable() const;
void ResetMoveable();
bool CheckReachable(Location, Bdir) const;
bool CheckReachable(Location) const; // recursive
//bool CheckWall(Location, Location, Bdir) const;
Location CheckWall() const;
int get_num() const{ return num; }
Location get_loc() const{ return loc; }
Location* get_moveableList() { return &moveableList[0]; }
int get_numMoveable() const{ return numMoveable; }
};
#endif // __CHARACTER_H