-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboard.h
44 lines (30 loc) · 883 Bytes
/
board.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
#ifndef BOARD_H_
#define BOARD_H_
#include <vector>
#include <iostream>
#include <boost/shared_ptr.hpp>
class Vector_2D;
class Cell;
#include "cell.h"
#include "player_id.h"
#include "vector_2d.h"
class Board {
public:
Board();
const Cell& get_cell(Vector_2D position) const;
Player_ID get_piece_ownership(Vector_2D position);
boost::shared_ptr<Game_piece> get_cell_contents(Vector_2D position);
void set_cell(Vector_2D position) const;
void set_cell_contents(Vector_2D position, boost::shared_ptr<Game_piece> piece);
void move_piece(Vector_2D initial, Vector_2D final);
unsigned int get_x_size() const;
unsigned int get_y_size() const;
void print_board();
Board clone();
int num_of_pieces(Player_ID player);
private:
std::vector<Cell> m_cells;
static const unsigned int K_BOARD_X_SIZE;
static const unsigned int K_BOARD_Y_SIZE;
};
#endif /* BOARD_H_ */