This is the doxygen documentation for gtkboard.
.#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include "game.h"
#include "aaball.h"
#include "../pixmaps/chess.xpm"
#include "../pixmaps/misc.xpm"
Go to the source code of this file.
Defines | |
#define | KTTOUR_CELL_SIZE 54 |
#define | KTTOUR_NUM_PIECES 4 |
#define | KTTOUR_BOARD_WID 8 |
#define | KTTOUR_BOARD_HEIT 8 |
#define | KTTOUR_EMPTY 0 |
#define | KTTOUR_CUR 1 |
#define | KTTOUR_START 2 |
#define | KTTOUR_USED 3 |
#define | KTTOUR_HINT 4 |
#define | abs(x) ((x)<0?-(x):(x)) |
#define | IS_FREE(x) ((x) == KTTOUR_EMPTY || (x) == KTTOUR_HINT) |
Functions | |
void | kttour_init () |
int | kttour_getmove (Pos *, int, int, GtkboardEventType, Player, byte **, int **) |
ResultType | kttour_who_won (Pos *, Player, char **) |
char** | kttour_get_pixmap (int, int) |
gboolean | are_nbrs (int x1, int y1, int x2, int y2) |
void | find_xy (byte *board, int *x, int *y, int val) |
int | get_degree (byte *board, int i, int j) |
int | get_min_degree (byte *board, int i, int j) |
void | add_hints (byte *board, int new_x, int new_y, byte **mp) |
Variables | |
char | kttour_colors [6] = {200, 200, 160, 200, 200, 160} |
Game | Kttour |
SCORE_FIELD | kttour_score_fields [] = {SCORE_FIELD_RANK, SCORE_FIELD_USER, SCORE_FIELD_TIME, SCORE_FIELD_DATE, SCORE_FIELD_NONE} |
char* | kttour_score_field_names [] = {"Rank", "User", "Time", "Date", NULL} |
int | incx [] = {-2, -2, -1, -1, 1, 1, 2, 2} |
int | incy [] = {-1, 1, -2, 2, -2, 2, -1, 1} |
|
Definition at line 156 of file kttour.c. Referenced by get_degree(), and get_min_degree(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 189 of file kttour.c. Referenced by kttour_getmove(). |
|
Definition at line 118 of file kttour.c. Referenced by add_hints(), kttour_getmove(), and kttour_who_won(). |
|
Definition at line 125 of file kttour.c. Referenced by kttour_getmove(), and kttour_who_won(). |
|
Definition at line 158 of file kttour.c. Referenced by add_hints(), and get_min_degree(). |
|
Definition at line 172 of file kttour.c. Referenced by add_hints(). |
|
|
|
|
|
|
|
|
|
Initial value: { KTTOUR_CELL_SIZE, KTTOUR_BOARD_WID, KTTOUR_BOARD_HEIT, KTTOUR_NUM_PIECES, kttour_colors, NULL, NULL, "Knight's tour", kttour_init} |
|
|
|
|
|
|
|
|
|
|