Atrinik Server  4.0
Functions
square_spiral.c File Reference
#include <global.h>

Go to the source code of this file.

Functions

void find_top_left_corner (char **maze, int *cx, int *cy)
 
char ** make_square_spiral_layout (int xsize, int ysize)
 

Detailed Description

Square-spiral layout generator.

Definition in file square_spiral.c.

Function Documentation

void find_top_left_corner ( char **  maze,
int *  cx,
int *  cy 
)

This starts from within a centered onion layer (or between two layers), and looks up until it finds a wall, and then looks right until it finds a vertical wall, i.e., the corner. It sets cx and cy to that. It also starts from cx and cy.

Parameters
mazeWhere to look.

Definition at line 40 of file square_spiral.c.

char** make_square_spiral_layout ( int  xsize,
int  ysize 
)

Generates a square-spiral layout.

Parameters
xsizeX size of the layout.
ysizeY size of the layout.
Returns
The generated layout.

Definition at line 66 of file square_spiral.c.