// Othello #ifndef STRATEGY_H #define STRATEGY_H // Information to control the game_engine: const int BOARD_SIZE = 8; const int SEARCH_DEPTH = 4; const int MAXIMUM_MOVES = BOARD_SIZE*BOARD_SIZE; const int PLAYER1 = -1; const int PLAYER2 = 1; const int EVAL_LIMIT = BOARD_SIZE*BOARD_SIZE*100; // Definitions of the state and move data types: struct state { int board[BOARD_SIZE+2][BOARD_SIZE+2]; // Put -1, 0 or +1 in each spot int whose_move_next; }; struct move { int row; // A number from 1 to BOARD_SIZE int column; // A number from 1 to BOARD_SIZE }; // Prototypes of functions implemented in strategy.cxx: void change_state(int who, move m, state& s); void compute_legal_moves(int who, state s, move moves[], int& many_moves); int evaluate(int who, const state& s); void initialize_state(state& s); bool is_game_over(const state& s); bool is_legal(int who, move m, const state& s); int winner(const state& s); #endif