-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBoard.h
More file actions
34 lines (30 loc) · 662 Bytes
/
Board.h
File metadata and controls
34 lines (30 loc) · 662 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
#ifndef BOARD_H_
#define BOARD_H_
#include <vector>
#include "BoardCell.h"
struct BoardCoords {
int row;
int column;
};
class Board {
private:
BoardCell emptyCell;
BoardCell **cells;
int filledCells = 0;
const int height;
const int width;
const int cellCount;
public:
Board(int height, int width);
Board(const Board& board);
virtual ~Board();
void show();
void setCell(BoardCoords coords, BoardCell& c);
BoardCell& getCell(BoardCoords coords);
bool isFilled();
int getWidth();
int getHeight();
std::vector<BoardCoords> getEmptyCells();
void clearCell(BoardCoords coords);
};
#endif