Browse Source

Merge pull request #305 from DragonAura/dev

fix(CAPI): 🐛 fix array out of range
tags/0.1.0
shangfengh GitHub 2 years ago
parent
commit
77308ffdbc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      CAPI/cpp/API/src/main.cpp

+ 5
- 1
CAPI/cpp/API/src/main.cpp View File

@@ -72,11 +72,15 @@ int THUAI6Main(int argc, char** argv, CreateAIFunc AIBuilder)
try
{
THUAI6::PlayerType playerType;
THUAI6::StudentType stuType = THUAI6::StudentType::NullStudentType;
if (pID == 4)
playerType = THUAI6::PlayerType::TrickerPlayer;
else
{
playerType = THUAI6::PlayerType::StudentPlayer;
Logic logic(playerType, pID, trickerType, studentType[pID]);
stuType = studentType[pID];
}
Logic logic(playerType, pID, trickerType, stuType);
logic.Main(AIBuilder, sIP, sPort, file, print, warnOnly);
}
catch (const std::exception& e)


Loading…
Cancel
Save