#include <grid.h>
Public Member Functions | |
| Grid () | |
| Standard constructor. | |
| void | set (int x, int y, char pl) |
| Sets board data of grid. | |
| char | get (int x, int y) |
| Returns board data at position x,y. | |
| void | draw () |
| Draws grid on screen. | |
| bool | can_player_move (int pl_no) |
| Tests if player can move. | |
| bool | isLegalMove (int px, int py, int plNo) |
| Checks if player's move at x,y is legal. | |
| void | printf (const char *fmt,...) |
| Sets up message. | |
Public Attributes | |
| int | map [boardSize] |
| The board data of grid. | |
Protected Attributes | |
| int | gfx_x |
| The x screen offset of grid. | |
| int | gfx_y |
| The y screen offset of grid. | |
| int | field_width |
| The grid field width. | |
| string | msg |
| The message string to be displayed. | |
This class is used to draw board on screen.
|
|
Tests if player can move.
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Returns board data at position x,y.
Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Checks if player's move at x,y is legal.
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Sets up message. This method sets message string. It's simillar like C printf function.
Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Sets board data of grid.
Here is the call graph for this function: ![]() |
1.3.7