Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef AI_H_
- #define AI_H_
- #include <string>
- // AI agents for connect 4.
- // Each agent corresponds a function. AI functions assume that the board
- // is not full and may crash the game if given an invalid board state.
- // This file also defines the main types of players (including human),
- // and the strings used in command-line flags to pick player types.
- enum class PlayerType { kHuman, kRandom, kFirst, kInvalid };
- // AI chooses first open space.
- // Corresponds to kFirst player type.
- int FirstOpenAgent(int board[6][7], int ai_player);
- // AI chooses a random open space.
- // Corresponds to kRandom player type.
- int RandomAgent(int board[6][7], int ai_player);
- // String names of player types.
- PlayerType GetPlayerType(const std::string &arg);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment