diff --git a/CAPI/AI.sln b/CAPI/AI.sln
index 822da78..164ab69 100644
--- a/CAPI/AI.sln
+++ b/CAPI/AI.sln
@@ -8,43 +8,13 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- MinSizeRel|Win32 = MinSizeRel|Win32
- MinSizeRel|x64 = MinSizeRel|x64
- MinSizeRel|x86 = MinSizeRel|x86
Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- RelWithDebInfo|Win32 = RelWithDebInfo|Win32
- RelWithDebInfo|x64 = RelWithDebInfo|x64
- RelWithDebInfo|x86 = RelWithDebInfo|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.Debug|Win32.ActiveCfg = Debug|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.Debug|Win32.Build.0 = Debug|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.Debug|x64.ActiveCfg = Debug|x64
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.Debug|x64.Build.0 = Debug|x64
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.Debug|x86.ActiveCfg = Debug|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.Debug|x86.Build.0 = Debug|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.MinSizeRel|x86.ActiveCfg = MinSizeRel|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.MinSizeRel|x86.Build.0 = MinSizeRel|Win32
+ {6D4987B3-D431-35BD-963C-E3ADA6053B41}.Debug|Win32.ActiveCfg = Release|Win32
+ {6D4987B3-D431-35BD-963C-E3ADA6053B41}.Debug|Win32.Build.0 = Release|Win32
{6D4987B3-D431-35BD-963C-E3ADA6053B41}.Release|Win32.ActiveCfg = Release|Win32
{6D4987B3-D431-35BD-963C-E3ADA6053B41}.Release|Win32.Build.0 = Release|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.Release|x64.ActiveCfg = Release|x64
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.Release|x64.Build.0 = Release|x64
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.Release|x86.ActiveCfg = Release|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.Release|x86.Build.0 = Release|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|Win32
- {6D4987B3-D431-35BD-963C-E3ADA6053B41}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/CAPI/AI.vcxproj b/CAPI/AI.vcxproj
index a82a61f..e8c138a 100644
--- a/CAPI/AI.vcxproj
+++ b/CAPI/AI.vcxproj
@@ -8,34 +8,10 @@
Debug
Win32
-
- Debug
- x64
-
-
- MinSizeRel
- Win32
-
Release
Win32
-
- Release
- x64
-
-
- MinSizeRel
- x64
-
-
- RelWithDebInfo
- Win32
-
-
- RelWithDebInfo
- x64
-
{6D4987B3-D431-35BD-963C-E3ADA6053B41}
@@ -46,46 +22,16 @@
NoUpgrade
-
- Application
- MultiByte
- v142
-
Application
MultiByte
v142
-
- Application
- MultiByte
- v142
-
Application
MultiByte
v142
-
- Application
- MultiByte
- v142
-
-
- Application
- MultiByte
- v142
-
-
- Application
- MultiByte
- v142
-
-
- Application
- MultiByte
- v142
-
@@ -95,89 +41,15 @@
<_ProjectFileVersion>10.0.20506.1
- .\Debug\
- AI.dir\Debug\
- AI
AI
- .exe
.exe
- true
true
- true
true
- .\Release\
- AI.dir\Release\
- AI
AI
- .exe
.exe
- false
false
- true
true
- .\MinSizeRel\
- AI.dir\MinSizeRel\
- AI
- AI
- .exe
- .exe
- false
- false
- true
- true
- .\RelWithDebInfo\
- AI.dir\RelWithDebInfo\
- AI
- AI
- .exe
- .exe
- true
- true
- true
- true
-
-
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
- %(AdditionalOptions) -O0 -g -ggdb
- $(IntDir)
- CompileAsCpp
- Sync
- NotUsing
- true
- false
- Level1
- WIN32;_WINDOWS;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)
- $(IntDir)
-
-
-
-
- WIN32;_DEBUG;_WINDOWS;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
-
-
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
- $(ProjectDir)/$(IntDir)
- %(Filename).h
- %(Filename).tlb
- %(Filename)_i.c
- %(Filename)_p.c
-
-
- gmock.lib;gmock_main.lib;libprotobuf.lib;libprotobuf-lite.lib;libprotoc.lib;pthreadVSE2.lib;HPSocket.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib
- ./windows_only/lib;./windows_only/lib/$(Configuration);%(AdditionalLibraryDirectories)
- %(AdditionalOptions) /machine:x64
- true
- %(IgnoreSpecificDefaultLibraries)
- ./Debug/AI.lib
- ./Debug/AI.pdb
- Console
-
-
- false
-
-
.\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
@@ -193,6 +65,7 @@
$(IntDir)
+ MultiThreaded
WIN32;_DEBUG;_WINDOWS;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)
@@ -209,7 +82,7 @@
gmock.lib;gmock_main.lib;libprotobuf.lib;libprotobuf-lite.lib;libprotoc.lib;pthreadVSE2.lib;HPSocket.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib
./windows_only/lib;./windows_only/lib/$(Configuration);%(AdditionalLibraryDirectories)
- %(AdditionalOptions) /machine:x64
+ %(AdditionalOptions) /machine:x86
true
%(IgnoreSpecificDefaultLibraries)
./Debug/AI.lib
@@ -220,48 +93,6 @@
false
-
-
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
- %(AdditionalOptions) -O3
- $(IntDir)
- CompileAsCpp
- Sync
- NotUsing
- true
- false
- Level1
- WIN32;_WINDOWS;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)
- $(IntDir)
-
-
-
-
- WIN32;_WINDOWS;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions)
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
-
-
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
- $(ProjectDir)/$(IntDir)
- %(Filename).h
- %(Filename).tlb
- %(Filename)_i.c
- %(Filename)_p.c
-
-
- gmock.lib;gmock_main.lib;libprotobuf.lib;libprotobuf-lite.lib;libprotoc.lib;pthreadVSE2.lib;HPSocket.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib
- ./windows_only/lib;./windows_only/lib/$(Configuration);%(AdditionalLibraryDirectories)
- %(AdditionalOptions) /machine:x64
- false
- %(IgnoreSpecificDefaultLibraries)
- ./Release/AI.lib
- ./Release/AI.pdb
- Console
-
-
- false
-
-
.\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
@@ -305,180 +136,6 @@
false
-
-
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
- $(IntDir)
- CompileAsCpp
- Sync
- OnlyExplicitInline
- MinSpace
- NotUsing
- MultiThreadedDLL
- true
- false
- Level3
- WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="MinSizeRel";%(PreprocessorDefinitions)
- $(IntDir)
-
-
-
-
- WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"MinSizeRel\";%(PreprocessorDefinitions)
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
-
-
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
- $(ProjectDir)/$(IntDir)
- %(Filename).h
- %(Filename).tlb
- %(Filename)_i.c
- %(Filename)_p.c
-
-
- gmock.lib;gmock_main.lib;libprotobuf.lib;libprotobuf-lite.lib;libprotoc.lib;pthreadVSE2.lib;HPSocket.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib
- ./windows_only/lib;./windows_only/lib/$(Configuration);%(AdditionalLibraryDirectories)
- %(AdditionalOptions) /machine:x64
- false
- %(IgnoreSpecificDefaultLibraries)
- ./MinSizeRel/AI.lib
- ./MinSizeRel/AI.pdb
- Console
-
-
- false
-
-
-
-
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
- $(IntDir)
- CompileAsCpp
- Sync
- OnlyExplicitInline
- MinSpace
- NotUsing
- MultiThreadedDLL
- true
- false
- Level3
- WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="MinSizeRel";%(PreprocessorDefinitions)
- $(IntDir)
-
-
-
-
- WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"MinSizeRel\";%(PreprocessorDefinitions)
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
-
-
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
- $(ProjectDir)/$(IntDir)
- %(Filename).h
- %(Filename).tlb
- %(Filename)_i.c
- %(Filename)_p.c
-
-
- gmock.lib;gmock_main.lib;libprotobuf.lib;libprotobuf-lite.lib;libprotoc.lib;pthreadVSE2.lib;HPSocket.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib
- ./windows_only/lib;./windows_only/lib/$(Configuration);%(AdditionalLibraryDirectories)
- %(AdditionalOptions) /machine:x64
- false
- %(IgnoreSpecificDefaultLibraries)
- ./MinSizeRel/AI.lib
- ./MinSizeRel/AI.pdb
- Console
-
-
- false
-
-
-
-
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
- $(IntDir)
- CompileAsCpp
- ProgramDatabase
- Sync
- OnlyExplicitInline
- MaxSpeed
- NotUsing
- MultiThreadedDLL
- true
- false
- Level3
- WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="RelWithDebInfo";%(PreprocessorDefinitions)
- $(IntDir)
-
-
- WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"RelWithDebInfo\";%(PreprocessorDefinitions)
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
-
-
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
- $(ProjectDir)/$(IntDir)
- %(Filename).h
- %(Filename).tlb
- %(Filename)_i.c
- %(Filename)_p.c
-
-
- gmock.lib;gmock_main.lib;libprotobuf.lib;libprotobuf-lite.lib;libprotoc.lib;pthreadVSE2.lib;HPSocket.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib
- ./windows_only/lib;./windows_only/lib/$(Configuration);%(AdditionalLibraryDirectories)
- %(AdditionalOptions) /machine:x64
- true
- %(IgnoreSpecificDefaultLibraries)
- ./RelWithDebInfo/AI.lib
- ./RelWithDebInfo/AI.pdb
- Console
-
-
- false
-
-
-
-
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
- $(IntDir)
- CompileAsCpp
- ProgramDatabase
- Sync
- OnlyExplicitInline
- MaxSpeed
- NotUsing
- MultiThreadedDLL
- true
- false
- Level3
- WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="RelWithDebInfo";%(PreprocessorDefinitions)
- $(IntDir)
-
-
- WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"RelWithDebInfo\";%(PreprocessorDefinitions)
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
-
-
- .\windows_only\include;.\include;.\windows_only\proto_files;%(AdditionalIncludeDirectories)
- $(ProjectDir)/$(IntDir)
- %(Filename).h
- %(Filename).tlb
- %(Filename)_i.c
- %(Filename)_p.c
-
-
- gmock.lib;gmock_main.lib;libprotobuf.lib;libprotobuf-lite.lib;libprotoc.lib;pthreadVSE2.lib;HPSocket.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib
- ./windows_only/lib;./windows_only/lib/$(Configuration);%(AdditionalLibraryDirectories)
- %(AdditionalOptions) /machine:x64
- true
- %(IgnoreSpecificDefaultLibraries)
- ./RelWithDebInfo/AI.lib
- ./RelWithDebInfo/AI.pdb
- Console
-
-
- false
-
-
diff --git a/CAPI/AI.vcxproj.user b/CAPI/AI.vcxproj.user
index e14d459..4081f7e 100644
--- a/CAPI/AI.vcxproj.user
+++ b/CAPI/AI.vcxproj.user
@@ -8,10 +8,6 @@
127.0.0.1 30000
WindowsLocalDebugger
-
- 127.0.0.1 30000
- WindowsLocalDebugger
-
127.0.0.1 30000
WindowsLocalDebugger
diff --git a/CAPI/include/Constant.h b/CAPI/include/Constant.h
index fe1e6d7..9e8ad4a 100644
--- a/CAPI/include/Constant.h
+++ b/CAPI/include/Constant.h
@@ -7,6 +7,7 @@
namespace Constant
{
+ const static int SendTimeLimit = 20;
struct Player
{
const static int InitMoveSpeed = 5;
diff --git a/CAPI/src/CAPI.cpp b/CAPI/src/CAPI.cpp
index 82ab9f2..39b5c65 100644
--- a/CAPI/src/CAPI.cpp
+++ b/CAPI/src/CAPI.cpp
@@ -18,6 +18,7 @@
#include "structures.h"
#include "player.h"
#include "Sema.h"
+#include "Constant.h"
#pragma comment(lib, "HPSocket.lib")
#include
@@ -163,7 +164,7 @@ void CAPI::SendChatMessage(string message)
bool CAPI::SendCommandMessage(MessageToServer message)
{
- static const int timelimit = 45;
+ static const int timelimit = Constant::SendTimeLimit;
static long long deltaSendTime[] = { timelimit + 5,timelimit + 5 };
static long long lastSendTime = 0;