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 (3)
34 typedef struct _POSITION
37 SQUARE sBoard[BOARD_SIZE][BOARD_SIZE];
38 unsigned int uNumEmpty;
41 #define NUM_TO_HPOS(x) ((x) % BOARD_SIZE)
42 #define NUM_TO_VPOS(x) ((x) / BOARD_SIZE)
45 // A representation of a move in a tic tac toe game
47 typedef unsigned int COORD;
59 #define INFINITY (+100)
63 // An assert mechanism
66 #define ASSERT(x) if (x) \
69 { (void) _assert(__FILE__, __LINE__); }