diff --git a/CAPI/cpp/API/include/AI.h b/CAPI/cpp/API/include/AI.h index cb6b373..d99063f 100644 --- a/CAPI/cpp/API/include/AI.h +++ b/CAPI/cpp/API/include/AI.h @@ -4,6 +4,10 @@ #include "API.h" +#undef GetMessage +#undef SendMessage +#undef PeekMessage + class IAI { public: diff --git a/CAPI/cpp/API/include/API.h b/CAPI/cpp/API/include/API.h index 1b89718..b3dec9e 100644 --- a/CAPI/cpp/API/include/API.h +++ b/CAPI/cpp/API/include/API.h @@ -22,6 +22,10 @@ #include "structures.h" +#undef GetMessage +#undef SendMessage +#undef PeekMessage + const constexpr int numOfGridPerCell = 1000; class IAI; diff --git a/CAPI/cpp/API/include/Communication.h b/CAPI/cpp/API/include/Communication.h index 2f75e43..9b2c19e 100644 --- a/CAPI/cpp/API/include/Communication.h +++ b/CAPI/cpp/API/include/Communication.h @@ -14,6 +14,10 @@ #include #include +#undef GetMessage +#undef SendMessage +#undef PeekMessage + class Logic; class Communication diff --git a/CAPI/cpp/API/include/ConcurrentQueue.hpp b/CAPI/cpp/API/include/ConcurrentQueue.hpp index 19fdf04..08e4a7c 100644 --- a/CAPI/cpp/API/include/ConcurrentQueue.hpp +++ b/CAPI/cpp/API/include/ConcurrentQueue.hpp @@ -8,6 +8,10 @@ #include #include +#undef GetMessage +#undef SendMessage +#undef PeekMessage + template class ConcurrentQueue { diff --git a/CAPI/cpp/API/include/constants.h b/CAPI/cpp/API/include/constants.h index d9407dd..51d2034 100644 --- a/CAPI/cpp/API/include/constants.h +++ b/CAPI/cpp/API/include/constants.h @@ -6,6 +6,10 @@ #define SCCI static const constexpr inline #endif +#undef GetMessage +#undef SendMessage +#undef PeekMessage + namespace Constants { SCCI int frameDuration = 50; // 每帧毫秒数 diff --git a/CAPI/cpp/API/include/logic.h b/CAPI/cpp/API/include/logic.h index 23098db..a6bd187 100644 --- a/CAPI/cpp/API/include/logic.h +++ b/CAPI/cpp/API/include/logic.h @@ -31,6 +31,10 @@ #include "Communication.h" #include "ConcurrentQueue.hpp" +#undef GetMessage +#undef SendMessage +#undef PeekMessage + // 封装了通信组件和对AI对象进行操作 class Logic : public ILogic { diff --git a/CAPI/cpp/API/include/state.h b/CAPI/cpp/API/include/state.h index 02f5543..c27c479 100644 --- a/CAPI/cpp/API/include/state.h +++ b/CAPI/cpp/API/include/state.h @@ -9,6 +9,10 @@ #include "structures.h" +#undef GetMessage +#undef SendMessage +#undef PeekMessage + // 存储场上的状态 struct State { diff --git a/CAPI/cpp/API/include/structures.h b/CAPI/cpp/API/include/structures.h index ccda444..5553c0d 100644 --- a/CAPI/cpp/API/include/structures.h +++ b/CAPI/cpp/API/include/structures.h @@ -8,6 +8,10 @@ #include #include +#undef GetMessage +#undef SendMessage +#undef PeekMessage + namespace THUAI6 { diff --git a/CAPI/cpp/API/include/utils.hpp b/CAPI/cpp/API/include/utils.hpp index 1044b74..de14b02 100644 --- a/CAPI/cpp/API/include/utils.hpp +++ b/CAPI/cpp/API/include/utils.hpp @@ -13,6 +13,10 @@ #include "structures.h" +#undef GetMessage +#undef SendMessage +#undef PeekMessage + namespace AssistFunction { diff --git a/CAPI/cpp/API/src/API.cpp b/CAPI/cpp/API/src/API.cpp index 895abcd..26926cc 100644 --- a/CAPI/cpp/API/src/API.cpp +++ b/CAPI/cpp/API/src/API.cpp @@ -1,6 +1,11 @@ #include #include "AI.h" #include "API.h" + +#undef GetMessage +#undef SendMessage +#undef PeekMessage + #define PI 3.14159265358979323846 int StudentAPI::GetFrameCount() const diff --git a/CAPI/cpp/API/src/Communication.cpp b/CAPI/cpp/API/src/Communication.cpp index f808e22..b620765 100644 --- a/CAPI/cpp/API/src/Communication.cpp +++ b/CAPI/cpp/API/src/Communication.cpp @@ -5,6 +5,10 @@ #include #include +#undef GetMessage +#undef SendMessage +#undef PeekMessage + using grpc::ClientContext; Communication::Communication(std::string sIP, std::string sPort) diff --git a/CAPI/cpp/API/src/DebugAPI.cpp b/CAPI/cpp/API/src/DebugAPI.cpp index fdeb857..34507c7 100644 --- a/CAPI/cpp/API/src/DebugAPI.cpp +++ b/CAPI/cpp/API/src/DebugAPI.cpp @@ -4,6 +4,11 @@ #include "API.h" #include "utils.hpp" #include "structures.h" + +#undef GetMessage +#undef SendMessage +#undef PeekMessage + #define PI 3.14159265358979323846 StudentDebugAPI::StudentDebugAPI(ILogic& logic, bool file, bool print, bool warnOnly, int64_t playerID) : diff --git a/CAPI/cpp/API/src/logic.cpp b/CAPI/cpp/API/src/logic.cpp index 54ec745..b3e42ab 100644 --- a/CAPI/cpp/API/src/logic.cpp +++ b/CAPI/cpp/API/src/logic.cpp @@ -8,6 +8,10 @@ #include "utils.hpp" #include "Communication.h" +#undef GetMessage +#undef SendMessage +#undef PeekMessage + extern const bool asynchronous; Logic::Logic(THUAI6::PlayerType type, int64_t ID, THUAI6::TrickerType tricker, THUAI6::StudentType student) : diff --git a/CAPI/cpp/API/src/main.cpp b/CAPI/cpp/API/src/main.cpp index ee0ecb6..611e347 100644 --- a/CAPI/cpp/API/src/main.cpp +++ b/CAPI/cpp/API/src/main.cpp @@ -4,6 +4,10 @@ #include #include +#undef GetMessage +#undef SendMessage +#undef PeekMessage + #ifdef _MSC_VER #pragma warning(disable : 4996) #endif diff --git a/CAPI/python/run.sh b/CAPI/python/run.sh index f0ff428..d787ec8 100755 --- a/CAPI/python/run.sh +++ b/CAPI/python/run.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -python PyAPI/main.py -I 172.22.32.1 -P 8888 -p 0 -d -o& -python PyAPI/main.py -I 172.22.32.1 -P 8888 -p 1 -o& +python PyAPI/main.py -I 172.22.32.1 -P 8888 -p 0& +# python PyAPI/main.py -I 172.22.32.1 -P 8888 -p 1 -o& # python PyAPI/main.py -I 172.22.32.1 -P 8888 -p 2& # python PyAPI/main.py -I 172.22.32.1 -P 8888 -p 3& -# python PyAPI/main.py -I 172.22.32.1 -P 8888 -p 4& \ No newline at end of file +python PyAPI/main.py -I 172.22.32.1 -P 8888 -p 4 -d& \ No newline at end of file