This is the doxygen documentation for gtkboard.

.
Main Page   Data Structures   File List   Data Fields   Globals  

maze.c File Reference

#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <math.h>
#include <gdk/gdkkeysyms.h>
#include "game.h"
#include "aaball.h"

Go to the source code of this file.

Defines

#define MAZE_CELL_SIZE   8
#define MAZE_NUM_PIECES   127
#define MAZE_BOARD_WID   60
#define MAZE_BOARD_HEIT   60
#define MAZE_WALL   2
#define MAZE_CUR   1

Functions

void maze_init ()
void maze_set_init_pos (Pos *pos)
char** maze_get_pixmap (int idx, int color)
int maze_getmove_kb (Pos *cur_pos, int key, Player glob_to_play, byte **move, int **)
ResultType maze_who_won (Pos *, Player, char **)
void maze_get_cur_pos (byte *pos, int *x, int *y)
int maze_checknbrs (int x, int y)
void recursive_pathgen (byte *board, int x, int y, int val)
void mazegen ()
char** maze_pixmap_square_gen (int idx, char *col)

Variables

char maze_colors [6] = {100, 150, 200, 100, 150, 200}
int* maze_init_pos = NULL
int maze_maze [MAZE_BOARD_WID][MAZE_BOARD_HEIT] = {{0}}
SCORE_FIELD maze_score_fields [] = {SCORE_FIELD_USER, SCORE_FIELD_TIME, SCORE_FIELD_DATE, SCORE_FIELD_NONE}
char* maze_score_field_names [] = {"User", "Time", "Date", NULL}
Game Maze


Define Documentation

#define MAZE_BOARD_HEIT   60
 

Definition at line 33 of file maze.c.

#define MAZE_BOARD_WID   60
 

Definition at line 32 of file maze.c.

#define MAZE_CELL_SIZE   8
 

Definition at line 29 of file maze.c.

#define MAZE_CUR   1
 

Definition at line 42 of file maze.c.

#define MAZE_NUM_PIECES   127
 

Definition at line 30 of file maze.c.

#define MAZE_WALL   2
 

Definition at line 41 of file maze.c.


Function Documentation

int maze_checknbrs ( int x,
int y )
 

Definition at line 134 of file maze.c.

Referenced by mazegen().

void maze_get_cur_pos ( byte * pos,
int * x,
int * y )
 

Definition at line 96 of file maze.c.

Referenced by maze_getmove_kb().

char** maze_get_pixmap ( int idx,
int color ) [static]
 

Definition at line 274 of file maze.c.

int maze_getmove_kb ( Pos * pos,
int key,
Player glob_to_play,
byte ** movp,
int ** rmovp ) [static]
 

Definition at line 106 of file maze.c.

void maze_init ( )
 

Definition at line 60 of file maze.c.

char** maze_pixmap_square_gen ( int idx,
char * col )
 

Definition at line 263 of file maze.c.

Referenced by maze_get_pixmap().

void maze_set_init_pos ( Pos * pos ) [static]
 

Definition at line 225 of file maze.c.

ResultType maze_who_won ( Pos * pos,
Player to_play,
char ** commp )
 

Definition at line 85 of file maze.c.

void mazegen ( ) [static]
 

Definition at line 173 of file maze.c.

Referenced by maze_set_init_pos().

void recursive_pathgen ( byte * board,
int x,
int y,
int val ) [static]
 

Definition at line 158 of file maze.c.

Referenced by hypermaze_set_init_pos(), maze_set_init_pos(), and recursive_pathgen().


Variable Documentation

Game Maze
 

Initial value:

 { MAZE_CELL_SIZE, MAZE_BOARD_WID, MAZE_BOARD_HEIT, 
        MAZE_NUM_PIECES, maze_colors,  NULL, NULL, "Maze", maze_init}

Definition at line 50 of file maze.c.

char maze_colors[6] = {100, 150, 200, 100, 150, 200}
 

Definition at line 35 of file maze.c.

int* maze_init_pos = NULL
 

Definition at line 37 of file maze.c.

int maze_maze[MAZE_BOARD_WID][MAZE_BOARD_HEIT] = {{0}} [static]
 

Definition at line 39 of file maze.c.

char* maze_score_field_names[] = {"User", "Time", "Date", NULL}
 

Definition at line 47 of file maze.c.

SCORE_FIELD maze_score_fields[] = {SCORE_FIELD_USER, SCORE_FIELD_TIME, SCORE_FIELD_DATE, SCORE_FIELD_NONE}
 

Definition at line 46 of file maze.c.