Utility to determine the symmetry of trap patterns.

Determine the symmetry of trap patterns. More...


Files

file  table_size.c
 Determine the symmetry of trap patterns - source file.

Functions

static void _interrupt (int sig)
 If this program receives a SIGINT, then print out the current totals.
static void _make_move (int pos)
 This routine does most of the work of determining the symmetry of trap patterns.
static int _revolve (int iplain)
 Revolve a plain 180 degrees about a diagonal axis.
static int _rotate (int iplain)
 Rotate a plain 90 degrees.
int main (void)
 Determine the symmetry of trap patterns.

Variables

int a_board
 Alpha board.
int b_board
 Beta board.
uint non_wins
 Number of non-winning patterns.
uint sym_0
 Number of 0-symmetrical patterns.
uint sym_2
 Number of 2-symmetrical patterns.
uint sym_4
 Number of 4-symmetrical patterns.
uint sym_8
 Number of 8-symmetrical patterns.

Detailed Description

Determine the symmetry of trap patterns.

Determine the symmetry of trap patterns. That is, determine the number of non-winning patterns, the number of 0-symmetrical patterns, the number of 2-symmetrical patterns, the number of 4-symmetrical patterns, and the number of 8-symmetrical patterns.


Function Documentation

static void _interrupt int  sig  )  [static]
 

If this program receives a SIGINT, then print out the current totals.

Parameters:
sig int : signal number.
Returns:
void.

static void _make_move int  pos  )  [static]
 

This routine does most of the work of determining the symmetry of trap patterns.

Parameters:
pos int : offset in plain to make move.
Returns:
void.

static int _revolve int  iplain  )  [static]
 

Revolve a plain 180 degrees about a diagonal axis.

Returns:
int : plain that has been revolved 180 degrees about a diagonal axis.

static int _rotate int  iplain  )  [static]
 

Rotate a plain 90 degrees.

Returns:
int : plain that has been rotated 90 degrees.

main void   ) 
 

Determine the symmetry of trap patterns.

Returns:
int.


Variable Documentation

a_board
 

Alpha board.

b_board
 

Beta board.

non_wins
 

Number of non-winning patterns.

sym_0
 

Number of 0-symmetrical patterns.

sym_2
 

Number of 2-symmetrical patterns.

sym_4
 

Number of 4-symmetrical patterns.

sym_8
 

Number of 8-symmetrical patterns.


Generated on Sat Sep 24 09:00:12 2011 for ScoreFour by  doxygen 1.4.5