9
#include <qvaluelist.h>
21
StoneHandler(BoardHandler *bh);
24
void toggleWorking(bool toggle) { workingOnNewMove = toggle; }
25
// bool addStone(Stone *stone, bool toAdd=true, bool toCheck=true);
26
bool addStone(Stone *stone, bool toAdd=true, bool toCheck=true, Matrix *m=NULL); //SL added eb 8
27
bool removeStone(int x, int y, bool hide=false);
28
int hasStone(int x, int y);
29
Stone* getStoneAt(int x, int y) { return stones->find(Matrix::coordsToKey(x, y)); }
30
QIntDict<Stone>* getAllStones() const { return stones; }
31
bool updateAll(Matrix *m, bool toDraw=true);
32
void checkAllPositions();
33
bool removeDeadGroup(int x, int y, int &caps, StoneColor &col, bool &dead);
34
bool markSekiGroup(int x, int y, int &caps, StoneColor &col, bool &seki);
35
void removeDeadMarks();
36
void updateDeadMarks(int &black, int &white);
37
bool checkFalseEye(Matrix *m, int x, int y, int col);
38
int numStones() const { return stones->count(); } // TODO: For debugging only currently.
45
// bool checkPosition(Stone *stone);
46
bool checkPosition(Stone *stone,Matrix *m); //SL added eb 8
47
Group* assembleGroup(Stone *stone,Matrix *m); //SL added eb 8
48
// Group* assembleGroup(Stone *stone);
49
Group* checkNeighbour(int x, int y, StoneColor color, Group *group,Matrix *m);
50
Group* checkNeighbour(int x, int y, StoneColor color, Group *group);
51
int countLiberties(Group *group, Matrix *m); //SL added eb 8
52
int countLibertiesOnMatrix(Group *group, Matrix *m);
53
void checkNeighbourLiberty(int x, int y, QValueList<int> &libCounted, int &liberties, Matrix *m);
54
void checkNeighbourLibertyOnMatrix(int x, int y, QValueList<int> &libCounted, int &liberties, Matrix *m);
57
QIntDict<Stone> *stones;
58
QPtrList<Group> *groups;
59
bool workingOnNewMove;
60
BoardHandler *boardHandler;