This is the doxygen documentation for gtkboard.
.
#include "stack.h"
#include "game.h"
#include "move.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
Go to the source code of this file.
Defines | |
#define | STACK_SIZE 4096 |
Maximum size of stack. | |
Functions | |
void | stack_free () |
void | movstack_init () |
int | movstack_get_num_moves () |
void | movstack_push (byte *board, byte *move) |
byte* | movstack_pop () |
void | movstack_trunc () |
Truncates a stack to the current poisition. More... | |
byte* | movstack_forw () |
byte* | movstack_back () |
void | movstack_free () |
void | statestack_push (void *state) |
void* | statestack_peek () |
void* | statestack_pop () |
void | statestack_trunc () |
void* | statestack_forw () |
void* | statestack_back () |
void | statestack_free () |
Variables | |
int | movstack_ptr = 0 |
Current position in the stack. | |
int | movstack_max = 0 |
Current size of the stack. | |
byte* | movstack [STACK_SIZE] |
Array for moves. | |
byte* | movinvstack [STACK_SIZE] |
Array for move inverses. See mov_getinv(). | |
int | statestack_ptr = 0 |
int | statestack_max = 0 |
void* | statestack [STACK_SIZE] |
stack is as follows: 0 ---> movstack_ptr : "back" list; movstack_ptr ---> movstack_max : "forward" list
Definition in file stack.c.
|
Maximum size of stack.
|
|
Definition at line 107 of file stack.c. Referenced by engine_back_move(). |
|
Definition at line 99 of file stack.c. Referenced by engine_forw_move(). |
|
Definition at line 115 of file stack.c. Referenced by stack_free(). |
|
|
|
|
|
|
|
|
|
Truncates a stack to the current poisition. This will be called when the user makes a move when it is not the final poisition. Definition at line 87 of file stack.c. Referenced by engine_make_move(), and engine_take_move(). |
|
Definition at line 52 of file stack.c. Referenced by engine_new_game(), and engine_reset_game(). |
|
Definition at line 180 of file stack.c. Referenced by engine_back_move(). |
|
Definition at line 172 of file stack.c. Referenced by engine_forw_move(). |
|
Definition at line 188 of file stack.c. Referenced by stack_free(). |
|
Definition at line 149 of file stack.c. Referenced by engine_make_move(), and engine_take_move(). |
|
|
|
|
|
|
|
Array for move inverses. See mov_getinv().
|
|
Array for moves.
|
|
Current size of the stack.
|
|
Current position in the stack.
|
|
|
|
|
|
|