-
Notifications
You must be signed in to change notification settings - Fork 0
/
square_piece.h
34 lines (28 loc) · 881 Bytes
/
square_piece.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
/*
* Squarepiece.h
*
* Created on: Apr 5, 2012
* Author: brode
*/
#ifndef SQUAREPIECE_H_
#define SQUAREPIECE_H_
#include "game_piece.h"
class Square_piece: public Game_piece {
public:
Square_piece(Vector_2D pos, Player_ID owner);
virtual ~Square_piece();
std::string get_textual_representation() const ;
bool valid_move(Vector_2D move, Board& board);
std::vector<Vector_2D> generate_moves(Board& board) const;
std::vector<Vector_2D> validate_moves(Board& board, std::vector<Vector_2D> moves) const;
std::vector<Vector_2D> generate_jumps(Board& board) const;
std::vector<Vector_2D> validate_jumps(Board& board, std::vector<Vector_2D> jumps) const;
std::vector<Vector_2D> valid_moves(Board& board) const;
virtual Game_piece* clone() {
return new Square_piece(*this);
}
virtual int worth() {
return 1;
}
};
#endif /* SQUAREPIECE_H_ */