-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmove.h
More file actions
41 lines (28 loc) · 676 Bytes
/
move.h
File metadata and controls
41 lines (28 loc) · 676 Bytes
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
//
// Created by david on 4/20/20.
//
#ifndef PANDEMONIUM_C_CODE_MOVE_H
#define PANDEMONIUM_C_CODE_MOVE_H
#include "Piece.h"
#include "Position.h"
//signifies the possible move codes for a piece
enum MOVE_CODE{
regular_movement,
regular_push
};
class Move{
public:
Move(Piece *moving_piece, Position target_position, int move_code){
_piece = moving_piece;
_position = target_position;
_code = move_code;
}
Piece *piece(){return _piece;};
Position position(){ return _position;};
int code(){return _code;};
private:
Piece *_piece;
Position _position;
int _code;
};
#endif //PANDEMONIUM_C_CODE_MOVE_H