#include <board.h>
Public Member Functions | |
| Board () | |
| Standard constructor. | |
| Board (int *map) | |
| Standard constructor with initialization. | |
| Board (int *map, int x, int y, int n) | |
| Standard constructor with initialization and setting position value. | |
| int | get (int x, int y) |
| Gets value of position. | |
| void | set (int x, int y, int n) |
| Sets value of position. | |
| vector< Board > | possible_moves (int pl_no) |
| Returns vector of boards of possible moves for player pl_no. | |
| void | move (int pl_no) |
| Sets new move mark to player value. | |
| void | draw (BITMAP *b, int off_x, int off_y, int field_width) |
| Draws the board on screen (bitmap). | |
| bool | operator== (Board &b) |
| Compares a board with itself. | |
| int | depthSearchScore (unsigned char pl, int moveAt) |
| Score of board for depth search. | |
| int | minimaxABScore (unsigned char pl) |
| Score of board for minimax search. | |
| bool | isLegalMove (int px, int py, int pl_no) |
| Tests if is legal move. | |
| bool | final () |
| Tests if this board has no possible moves for any player. | |
| void | print () |
| Prints debug information. | |
Public Attributes | |
| int | map [boardWidth *boardHeight] |
| Map of board. | |
|
|
Standard constructor. Initializes the map array to zeros. |
|
|
Standard constructor with initialization. Constract object and initializez the map attribut with new data.
|
|
||||||||||||||||||||
|
Standard constructor with initialization and setting position value. Initializes map attribut with data. And then set value of member at x,y position.
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Score of board for depth search. This returns a score for the board, for player and his move.
Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
Draws the board on screen (bitmap). This draws board in bitmap.
Here is the call graph for this function: ![]() |
|
|
Tests if this board has no possible moves for any player. This function determinate if can player one or player two move on this board. In other words this check if this is final state of game.
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Gets value of position. Returns the map attribute value of x, y position.
Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Tests if is legal move. Tests if player number pl can legally put stone on px,py position of the board/
Here is the call graph for this function: ![]() |
|
|
Score of board for minimax search. This returns a score of the board, for player. It's used for minimax search.
Here is the call graph for this function: ![]() |
|
|
Sets new move mark to player value. This search the map attribute until it findes the mark of new player move (= -1). Than this possiton sets to value, that repesents the occupation of this filed for player pl_no.
Here is the call graph for this function: ![]() |
|
|
Compares a board with itself.
Here is the call graph for this function: ![]() |
|
|
Returns vector of boards of possible moves for player pl_no. This returns a STL vector of boards. This vector represents possible moves for player with number pl_no.
Here is the call graph for this function: ![]() |
|
|
Prints debug information. This prints debug information of state of this board on standard output. Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Sets value of position. Sets the map attribute value of x, y position.
Here is the call graph for this function: ![]() |
|
|
Map of board. This is array of int. Every member represents if this position is occuped by player one (=1), by player two (=2), or if it's free (=0). There's a special mark (=-1) that stands for position of next move of player. |
1.3.7