-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChessMove.hpp
More file actions
38 lines (36 loc) · 916 Bytes
/
ChessMove.hpp
File metadata and controls
38 lines (36 loc) · 916 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
#pragma once
#include "Move.hpp"
class ChessMove : public Move
{
private:
int from_row;
int from_col;
int to_row;
int to_col;
int piece;
int color;
int take_row = -1;
int take_col = -1;
bool promotion = false;
public:
ChessMove(int from_row, int from_col, int to_row, int to_col, int color, int piece, int take_row = -1, int take_col = -1, bool promotion = false);
int getFromRow();
int getFromCol();
int getToRow();
int getToCol();
int getPiece();
int getColor();
int getTakeRow();
int getTakeCol();
bool getPromotion();
void setFromRow(int from_row);
void setFromCol(int from_col);
void setToRow(int to_row);
void setToCol(int to_col);
void setPiece(int piece);
void setColor(int color);
void setTakeRow(int take_row);
void setTakeCol(int take_col);
void setPromotion(bool promotion);
bool eq(std::shared_ptr<Move> other);
};