#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <ctype.h>
#include <fcntl.h>
#include <malloc.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "assert.h"
#include "score4.h"
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. | |
| short * | alpha_ptr_1 |
| Alpha board ptr. | |
| short * | beta_ptr_1 |
| Beta board ptr. | |
| int * | coeff_1 |
| Coefficients. | |
| short | a_board_1 [NUM_PLAINS] |
| Alpha board. | |
| short | b_board_1 [NUM_PLAINS] |
| Beta board. | |
| char | mach_ch_1 |
| Machine stone - wither 'O' or 'X'. | |
| char | user_ch_1 |
| User stone - wither 'O' or 'X'. | |
1.4.5