summaryrefslogtreecommitdiffstats
path: root/GameField.hpp
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-02-19 17:58:36 +0000
committerJoursoir <chat@joursoir.net>2021-02-19 17:58:36 +0000
commitf8ef01b479ffac6e4432970ca4c471635dc2b120 (patch)
tree85443ff53d3e4e299bfd0733230f2d095a8722a6 /GameField.hpp
parentb3228ceab88cd2a37b7aca127237403e010b060b (diff)
downloadlp-gomoku-f8ef01b479ffac6e4432970ca4c471635dc2b120.tar.gz
lp-gomoku-f8ef01b479ffac6e4432970ca4c471635dc2b120.tar.bz2
lp-gomoku-f8ef01b479ffac6e4432970ca4c471635dc2b120.zip
add copy constructor and helpful getters
Diffstat (limited to 'GameField.hpp')
-rw-r--r--GameField.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/GameField.hpp b/GameField.hpp
index 4c6d61d..de5ccd1 100644
--- a/GameField.hpp
+++ b/GameField.hpp
@@ -21,11 +21,15 @@ class GameField {
int who_move;
public:
GameField(int a_cols, int a_rows, int a_lwin);
+ GameField(const GameField &a);
~GameField();
int GetState() { return state; }
+ int GetCols() { return cols; }
+ int GetRows() { return rows; }
bool CanMove(int y, int x);
void Move(int y, int x);
+ void UndoMove(int y, int x);
private:
void UpdateState(int y, int x);