-
Notifications
You must be signed in to change notification settings - Fork 11
/
boardawale.h
52 lines (35 loc) · 1.06 KB
/
boardawale.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
#ifndef __BOARDAWALE__
#define __BOARDAWALE__
#include "board.h"
class MoveAwale : public Move {
friend class BoardAwale;
public:
MoveAwale(Token player,int position);
void print() const override;
Move* deepcopy() const override;
bool compare(const Move& move) const override;
private:
int position;
};
class BoardAwale : public Board {
public:
BoardAwale();
~BoardAwale() override;
Board* deepcopy() const override;
Move* parse_move_string(Token player,const char *string) const override;
void print() const override;
inline bool is_move_valid(const Move& move) const override;
inline bool is_move_valid(const MoveAwale& move) const;
Moves get_possible_moves(Token player) const override;
void play_move(const Move& move) override;
bool play_random_move(Token player) override;
Token check_for_win() const override;
private:
static int format_slot(int count);
int player1_slots[6];
int player2_slots[6];
int player1_score;
int player2_score;
int round_counter;
};
#endif