This is the doxygen documentation for gtkboard.
.#include <stdio.h>#include <assert.h>#include "game.h"Go to the source code of this file.
Defines | |
| #define | TOWERS_CELL_SIZE 16 |
| #define | TOWERS_NUM_PIECES 3 |
| #define | TOWERS_TOWER_WID 17 |
| #define | TOWERS_BOARD_WID (3 * TOWERS_TOWER_WID) |
| #define | TOWERS_BOARD_HEIT 18 |
| #define | TOWERS_EMPTY 0 |
| #define | TOWERS_POLE 1 |
| #define | TOWERS_RING_TOP 2 |
| #define | TOWERS_RING_BOT 3 |
| #define | TOWERS_RING_MID 3 |
| #define | TOWERS_RING_LEFT 4 |
| #define | TOWERS_RING_RIGHT 5 |
| #define | POLE_ROW(x) (((x)/TOWERS_TOWER_WID)*TOWERS_TOWER_WID+TOWERS_TOWER_WID/2) |
Functions | |
| void | towers_init () |
| int | towers_getmove (Pos *, int, int, GtkboardEventType, Player, byte **, int **) |
| ResultType | towers_who_won (Pos *, Player, char **) |
| void | towers_reset_uistate () |
| void | towers_get_render (Pos *pos, byte *move, int **rmovp) |
| gboolean | towers_over (byte *board) |
| void | get_top_ring (byte *board, int row, int *heit, int *len) |
Variables | |
| char | towers_colors [6] = {150, 150, 150, 150, 150, 150} |
| char* | pole_16_16_xpm [] |
| char* | ring_top_16_16_xpm [] |
| char* | ring_bot_16_16_xpm [] |
| char** | towers_pixmaps [] |
| int | towers_init_pos [] |
| Game | Towers |
| SCORE_FIELD | towers_score_fields [] = {SCORE_FIELD_RANK, SCORE_FIELD_USER, SCORE_FIELD_SCORE, SCORE_FIELD_TIME, SCORE_FIELD_DATE, SCORE_FIELD_NONE} |
| char* | towers_score_field_names [] = {"Rank", "User", "Moves", "Time", "Date", NULL} |
| int | cur_row = -1 |
|
|
Definition at line 198 of file towers.c. Referenced by get_top_ring(), and towers_getmove(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 201 of file towers.c. Referenced by towers_getmove(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 179 of file towers.c. Referenced by towers_who_won(). |
|
|
|
|
|
|
|
|
Initial value: { TOWERS_CELL_SIZE, TOWERS_BOARD_WID, TOWERS_BOARD_HEIT,
TOWERS_NUM_PIECES,
towers_colors, towers_init_pos, towers_pixmaps,
"Tower of Hanoi",
towers_init} |
|
|
|
|
|
Initial value: {
"16 16 5 1",
"1 c #AAAA66",
"2 c #999955",
"3 c #888844",
"4 c #80803b",
"5 c #777733",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
"5433221111223345",
} |
|
|
Initial value: {
"16 16 2 1",
" c #cccc99",
". c #aaaa77",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
"................",
"................",
} |
|
|
Initial value: {
"16 16 2 1",
" c #cccc99",
". c #aaaa77",
"................",
"................",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
} |
|
|
|
|
|
Initial value:
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 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