#include #include #include #include "AI.h" #include "constants.h" // 为假则play()期间确保游戏状态不更新,为真则只保证游戏状态在调用相关方法时不更新 extern const bool asynchronous = false; // 选手需要依次将player0到player4的职业在这里定义 extern const std::array studentType = { THUAI6::StudentType::Athlete, THUAI6::StudentType::Teacher, THUAI6::StudentType::StraightAStudent, THUAI6::StudentType::Sunshine}; extern const THUAI6::TrickerType trickerType = THUAI6::TrickerType::Assassin; // 选手只需写一个即可,为了调试方便写了两个的话也不会有影响 void AI::play(IStudentAPI& api) { // 公共操作 if (this->playerID == 0) { // 玩家0执行操作 } else if (this->playerID == 1) { // 玩家1执行操作 } else if (this->playerID == 2) { // 玩家2执行操作 } else if (this->playerID == 3) { // 玩家3执行操作 } // 公共操作 } void AI::play(ITrickerAPI& api) { auto self = api.GetSelfInfo(); api.PrintSelfInfo(); }