4 #define ALPHA_BETA_SEARCH 1
12 typedef unsigned int BOOL;
15 // Constants for each state a board square can be in and a programmer
16 // defined type for these states.
22 #define OPPOSITE_MARK(m) ((m) * -1)
23 #define X_OR_O(m) (((m) == X_MARK) || \
26 typedef signed char SQUARE;
27 #define IS_SQUARE_EMPTY(x) (x == EMPTY)
30 // A (simple) representation of a tic tac toe position
32 #define BOARD_SIZE (5)
34 typedef struct _POSITION
37 SQUARE sBoard[BOARD_SIZE][BOARD_SIZE];
38 int iVSums[BOARD_SIZE];
39 int iHSums[BOARD_SIZE];
41 unsigned int uNumEmpty;
44 #define NUM_TO_HPOS(x) ((x) % BOARD_SIZE)
45 #define NUM_TO_VPOS(x) ((x) / BOARD_SIZE)
46 #define VALID_SUM(x) (((x) <= BOARD_SIZE) && \
50 // A representation of a move in a tic tac toe game
52 typedef unsigned int COORD;
64 #define INFINITY (+100)
68 // An assert mechanism
71 #define ASSERT(x) if (x) \
74 { (void) _assert(__FILE__, __LINE__); }