mirror of
https://github.com/LHY0125/Gobang-Game.git
synced 2026-05-10 02:19:46 +08:00
71 lines
1.2 KiB
C
71 lines
1.2 KiB
C
/**
|
|
* @file game_mode.h
|
|
* @author ??????(3364451258@qq.com??15236416560@163.com??lhy3364451258@outlook.com)
|
|
* @brief ????????????????
|
|
* @version 3.0
|
|
* @date 2025-06-30
|
|
*
|
|
* @copyright Copyright (c) 2025
|
|
*
|
|
* @note ?????????????????????????????????
|
|
* 1. AI?????
|
|
* 2. ???????
|
|
* 3. ??????
|
|
*/
|
|
|
|
#ifndef GAME_MODE_H
|
|
#define GAME_MODE_H
|
|
|
|
#include "gobang.h"
|
|
|
|
// ????????????
|
|
#define INPUT_UNDO -1
|
|
#define INPUT_SAVE -2
|
|
#define INPUT_EXIT -3
|
|
|
|
/**
|
|
* @brief ????????????????
|
|
*
|
|
* @param prompt ??????
|
|
* @param min ?????
|
|
* @param max ????
|
|
* @return int ?????????
|
|
*/
|
|
int get_integer_input(const char *prompt, int min, int max);
|
|
|
|
/**
|
|
* @brief ?????????
|
|
*
|
|
* @param x ?????????????
|
|
* @param y ??????????????
|
|
* @return true ????????
|
|
* @return false ????????
|
|
*/
|
|
bool parse_player_input(int *x, int *y);
|
|
|
|
/**
|
|
* @brief ????AI???
|
|
*
|
|
* @param current_player ??????
|
|
*/
|
|
bool handle_player_turn(int current_player);
|
|
|
|
/**
|
|
* @brief AI?????
|
|
* ????????AI???????
|
|
*/
|
|
void run_ai_game();
|
|
|
|
/**
|
|
* @brief ???????
|
|
* ???????????????????
|
|
*/
|
|
void run_pvp_game();
|
|
|
|
/**
|
|
* @brief ??????
|
|
* ???????????????
|
|
*/
|
|
void run_review_mode();
|
|
|
|
#endif // GAME_MODE_H
|