|
libkombilo
0.8
|
#include <abstractboard.h>
Public Member Functions | |
| abstractBoard (int bs=19) throw (BoardError) | |
| abstractBoard (const abstractBoard &ab) | |
| abstractBoard & | operator= (const abstractBoard &ab) |
| void | clear () |
| Clear the board and the undostack. | |
| int | play (int x, int y, const char *color) throw (BoardError) |
play a move of specified color (a string starting with b, B, w or W) at given position (x, y between 0 and boardsize-1) | |
| void | undo (int n=1) |
undo n moves | |
| void | remove (int x, int y, bool removeFromUndostack) |
| char | getStatus (int x, int y) |
| void | setStatus (int x, int y, char val) |
Convenience methods to handle the undostack | |
The undostack contains information about all moves played (and in particular the captures made with each of those moves. | |
| int | len_cap_last () throw (BoardError) |
| void | undostack_append_pass () |
| p_cc | undostack_top_pos () |
| char | undostack_top_color () |
| std::vector< p_cc > | undostack_top_captures () |
| void | undostack_push (Move &m) |
| void | undostack_pop () |
Data Fields | |
| int | boardsize |
| std::vector< Move > | undostack |
This class implements an "abstract" go board where you can play stones. The play method checks whether the move is legal, and computes the captures which it makes.
1.8.11