blob: db87a3966645b82bb5704e5cda661ef7e93124a1 (
plain)
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
|
#ifndef _GRID_H_
#define _GRID_H_
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include "piece.h"
using std::string;
using std::cout;
using std::endl;
using std::vector;
class Grid
{
private:
int rows;
int cols;
int numOfMoves;
int lastMoved; /* 0 = left, 1 = right, 2 = up, 3 = down */
int lastMoveDir;
vector<Piece> pieces;
vector<string> moves;
string *board;
public:
Grid(void);
/* we do not need a copy constructor since the deault shallow copy will be fine */
//Grid(const Grid &);
int *getRows(void);
int *getCols(void);
int *getNumOfMoves(void);
vector<Piece> *getPieces(void);
void setRows(int);
void setCols(int);
void addMove(string);
void markPiecesPos(void);
void setlastMoved(int);
int getlastMoved(void);
void printMoves(void);
};
#endif
|