mirror of
https://github.com/jie65535/Landlords.git
synced 2024-07-27 19:05:27 +08:00
提交源代码
上次创建Git仓库后忘记上传代码了。。 编译环境 VS2017 需要配合酷Q C++ SDK使用
This commit is contained in:
BIN
Landlords/CQP.lib
Normal file
BIN
Landlords/CQP.lib
Normal file
Binary file not shown.
2
Landlords/Debug/Landlords.log
Normal file
2
Landlords/Debug/Landlords.log
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Room.cpp
|
||||||
|
Landlords.vcxproj -> F:\C++\代码\斗地主\Landlords\Debug\me.cqp.jie.landlords.dll
|
BIN
Landlords/Debug/Landlords.obj
Normal file
BIN
Landlords/Debug/Landlords.obj
Normal file
Binary file not shown.
BIN
Landlords/Debug/Landlords.tlog/CL.command.1.tlog
Normal file
BIN
Landlords/Debug/Landlords.tlog/CL.command.1.tlog
Normal file
Binary file not shown.
BIN
Landlords/Debug/Landlords.tlog/CL.read.1.tlog
Normal file
BIN
Landlords/Debug/Landlords.tlog/CL.read.1.tlog
Normal file
Binary file not shown.
BIN
Landlords/Debug/Landlords.tlog/CL.write.1.tlog
Normal file
BIN
Landlords/Debug/Landlords.tlog/CL.write.1.tlog
Normal file
Binary file not shown.
2
Landlords/Debug/Landlords.tlog/Landlords.lastbuildstate
Normal file
2
Landlords/Debug/Landlords.tlog/Landlords.lastbuildstate
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.16299.0
|
||||||
|
Debug|Win32|F:\C++\代码\斗地主\Landlords\|
|
BIN
Landlords/Debug/Landlords.tlog/Landlords.write.1u.tlog
Normal file
BIN
Landlords/Debug/Landlords.tlog/Landlords.write.1u.tlog
Normal file
Binary file not shown.
BIN
Landlords/Debug/Landlords.tlog/link.command.1.tlog
Normal file
BIN
Landlords/Debug/Landlords.tlog/link.command.1.tlog
Normal file
Binary file not shown.
BIN
Landlords/Debug/Landlords.tlog/link.read.1.tlog
Normal file
BIN
Landlords/Debug/Landlords.tlog/link.read.1.tlog
Normal file
Binary file not shown.
BIN
Landlords/Debug/Landlords.tlog/link.write.1.tlog
Normal file
BIN
Landlords/Debug/Landlords.tlog/link.write.1.tlog
Normal file
Binary file not shown.
BIN
Landlords/Debug/Player.obj
Normal file
BIN
Landlords/Debug/Player.obj
Normal file
Binary file not shown.
BIN
Landlords/Debug/PlayingCards.obj
Normal file
BIN
Landlords/Debug/PlayingCards.obj
Normal file
Binary file not shown.
BIN
Landlords/Debug/Process.obj
Normal file
BIN
Landlords/Debug/Process.obj
Normal file
Binary file not shown.
BIN
Landlords/Debug/Room.obj
Normal file
BIN
Landlords/Debug/Room.obj
Normal file
Binary file not shown.
BIN
Landlords/Debug/Server.obj
Normal file
BIN
Landlords/Debug/Server.obj
Normal file
Binary file not shown.
BIN
Landlords/Debug/dllmain.obj
Normal file
BIN
Landlords/Debug/dllmain.obj
Normal file
Binary file not shown.
34
Landlords/Debug/me.cqp.jie.landlords.Build.CppClean.log
Normal file
34
Landlords/Debug/me.cqp.jie.landlords.Build.CppClean.log
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
f:\c++\代码\斗地主\landlords\debug\me.cqp.jie.landlords.pch.codeanalysis
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\vc141.pdb
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\vc141.idb
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\me.cqp.jie.landlords.pch.codeanalysisast
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\stdafx.nativecodeanalysis.xml
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\stdafx.obj
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\me.cqp.jie.landlords.pch
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\dllmain.nativecodeanalysis.xml
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\landlords.nativecodeanalysis.xml
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\player.nativecodeanalysis.xml
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\process.nativecodeanalysis.xml
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\room.nativecodeanalysis.xml
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\server.nativecodeanalysis.xml
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\server.obj
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\room.obj
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\process.obj
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\player.obj
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\landlords.obj
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\dllmain.obj
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\me.cqp.jie.landlords.lib
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\me.cqp.jie.landlords.exp
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\me.cqp.jie.landlords.dll
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\me.cqp.jie.landlords.ilk
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\me.cqp.jie.landlords.pdb
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\nativecodeanalysis.read.1.tlog
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\vc.nativecodeanalysis.all.xml
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\me.cqp.jie.landlords.dll.lastcodeanalysissucceeded
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\landlords.tlog\cl.command.1.tlog
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\landlords.tlog\cl.read.1.tlog
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\landlords.tlog\cl.write.1.tlog
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\landlords.tlog\landlords.write.1u.tlog
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\landlords.tlog\link.command.1.tlog
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\landlords.tlog\link.read.1.tlog
|
||||||
|
f:\c++\代码\斗地主\landlords\debug\landlords.tlog\link.write.1.tlog
|
BIN
Landlords/Debug/me.cqp.jie.landlords.dll
Normal file
BIN
Landlords/Debug/me.cqp.jie.landlords.dll
Normal file
Binary file not shown.
BIN
Landlords/Debug/me.cqp.jie.landlords.exp
Normal file
BIN
Landlords/Debug/me.cqp.jie.landlords.exp
Normal file
Binary file not shown.
BIN
Landlords/Debug/me.cqp.jie.landlords.ilk
Normal file
BIN
Landlords/Debug/me.cqp.jie.landlords.ilk
Normal file
Binary file not shown.
BIN
Landlords/Debug/me.cqp.jie.landlords.lib
Normal file
BIN
Landlords/Debug/me.cqp.jie.landlords.lib
Normal file
Binary file not shown.
BIN
Landlords/Debug/me.cqp.jie.landlords.pch
Normal file
BIN
Landlords/Debug/me.cqp.jie.landlords.pch
Normal file
Binary file not shown.
BIN
Landlords/Debug/me.cqp.jie.landlords.pdb
Normal file
BIN
Landlords/Debug/me.cqp.jie.landlords.pdb
Normal file
Binary file not shown.
BIN
Landlords/Debug/stdafx.obj
Normal file
BIN
Landlords/Debug/stdafx.obj
Normal file
Binary file not shown.
BIN
Landlords/Debug/vc141.idb
Normal file
BIN
Landlords/Debug/vc141.idb
Normal file
Binary file not shown.
BIN
Landlords/Debug/vc141.pdb
Normal file
BIN
Landlords/Debug/vc141.pdb
Normal file
Binary file not shown.
BIN
Landlords/Landlords.cpp
Normal file
BIN
Landlords/Landlords.cpp
Normal file
Binary file not shown.
3
Landlords/Landlords.h
Normal file
3
Landlords/Landlords.h
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#pragma once
|
||||||
|
#define CQAPPID "me.cqp.jie.landlords" //<2F><><EFBFBD><EFBFBD>AppID<49><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> http://d.cqp.me/Pro/<2F><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
#define CQAPPINFO CQAPIVERTEXT "," CQAPPID
|
31
Landlords/Landlords.sln
Normal file
31
Landlords/Landlords.sln
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.27130.2036
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Landlords", "Landlords.vcxproj", "{B402092F-048F-49AD-83D4-2AA6147FFD4D}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{B402092F-048F-49AD-83D4-2AA6147FFD4D}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{B402092F-048F-49AD-83D4-2AA6147FFD4D}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{B402092F-048F-49AD-83D4-2AA6147FFD4D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{B402092F-048F-49AD-83D4-2AA6147FFD4D}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{B402092F-048F-49AD-83D4-2AA6147FFD4D}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{B402092F-048F-49AD-83D4-2AA6147FFD4D}.Release|x64.Build.0 = Release|x64
|
||||||
|
{B402092F-048F-49AD-83D4-2AA6147FFD4D}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{B402092F-048F-49AD-83D4-2AA6147FFD4D}.Release|x86.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {C440E136-2D5E-4954-92E5-3F28627FC23B}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
190
Landlords/Landlords.vcxproj
Normal file
190
Landlords/Landlords.vcxproj
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>15.0</VCProjectVersion>
|
||||||
|
<ProjectGuid>{B402092F-048F-49AD-83D4-2AA6147FFD4D}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>Landlords</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<TargetName>me.cqp.jie.landlords</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<TargetName>me.cqp.jie.landlords</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;LANDLORDS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;LANDLORDS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;LANDLORDS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;LANDLORDS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="cqp.h" />
|
||||||
|
<ClInclude Include="define.h" />
|
||||||
|
<ClInclude Include="Landlords.h" />
|
||||||
|
<ClInclude Include="Player.h" />
|
||||||
|
<ClInclude Include="PlayingCards.h" />
|
||||||
|
<ClInclude Include="Process.h" />
|
||||||
|
<ClInclude Include="Room.h" />
|
||||||
|
<ClInclude Include="Server.h" />
|
||||||
|
<ClInclude Include="stdafx.h" />
|
||||||
|
<ClInclude Include="targetver.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="dllmain.cpp" />
|
||||||
|
<ClCompile Include="Landlords.cpp" />
|
||||||
|
<ClCompile Include="Player.cpp" />
|
||||||
|
<ClCompile Include="PlayingCards.cpp" />
|
||||||
|
<ClCompile Include="Process.cpp" />
|
||||||
|
<ClCompile Include="Room.cpp" />
|
||||||
|
<ClCompile Include="Server.cpp" />
|
||||||
|
<ClCompile Include="stdafx.cpp">
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="me.cqp.jie.landlords.json" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Library Include="CQP.lib" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Text Include="recording.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
84
Landlords/Landlords.vcxproj.filters
Normal file
84
Landlords/Landlords.vcxproj.filters
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="源文件">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="头文件">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="资源文件">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="stdafx.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="targetver.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="cqp.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Landlords.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Player.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Room.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Server.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="define.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Process.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="PlayingCards.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="stdafx.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Landlords.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="dllmain.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Player.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Room.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Server.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Process.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="PlayingCards.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="me.cqp.jie.landlords.json" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Library Include="CQP.lib" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Text Include="recording.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
6
Landlords/Landlords.vcxproj.user
Normal file
6
Landlords/Landlords.vcxproj.user
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ShowAllFiles>false</ShowAllFiles>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
13
Landlords/Player.cpp
Normal file
13
Landlords/Player.cpp
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#include "stdafx.h"
|
||||||
|
#include "Player.h"
|
||||||
|
|
||||||
|
|
||||||
|
Player::Player(playerID_t id):
|
||||||
|
m_id(id), m_name(), m_integral(0), m_currRoom(0), isReady(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Player::~Player()
|
||||||
|
{
|
||||||
|
}
|
36
Landlords/Player.h
Normal file
36
Landlords/Player.h
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "define.h"
|
||||||
|
// #include <string>
|
||||||
|
|
||||||
|
class Player
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Player() = delete;
|
||||||
|
Player(playerID_t id);
|
||||||
|
~Player();
|
||||||
|
|
||||||
|
playerID_t getID() { return m_id; }
|
||||||
|
int getIntegral() { return m_integral; }
|
||||||
|
roomID_t getCurrRoom() { return m_currRoom; }
|
||||||
|
void setCurrRoom(roomID_t rid) { m_currRoom = rid; }
|
||||||
|
std::string getName() { return m_name; }
|
||||||
|
void setName(std::string newName) { m_name = newName; }
|
||||||
|
void setIntegral(int integral) { m_integral = integral; }
|
||||||
|
|
||||||
|
// <20>÷<EFBFBD> <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD>ӷ<EFBFBD> <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD>۷<EFBFBD>
|
||||||
|
void score(int integral) { m_integral += integral; }
|
||||||
|
|
||||||
|
bool operator==(Player &rhs) { return m_id == rhs.getID(); }
|
||||||
|
bool operator==(playerID_t pid) { return m_id == pid; }
|
||||||
|
bool operator<(Player &rhs) { return m_id < rhs.getID(); }
|
||||||
|
bool operator<(playerID_t pid) { return m_id < pid; }
|
||||||
|
public:
|
||||||
|
bool isReady; // <><D7BC>
|
||||||
|
private:
|
||||||
|
playerID_t m_id; // ΨһID
|
||||||
|
std::string m_name; // <20>dz<EFBFBD>
|
||||||
|
int m_integral; // <20><><EFBFBD><EFBFBD>
|
||||||
|
roomID_t m_currRoom; // <20><>ǰ<EFBFBD><C7B0><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>(0Ϊ<30><CEAA>)
|
||||||
|
};
|
||||||
|
|
153
Landlords/PlayingCards.cpp
Normal file
153
Landlords/PlayingCards.cpp
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
#include "stdafx.h"
|
||||||
|
#include "PlayingCards.h"
|
||||||
|
|
||||||
|
void PlayingCards::updata()
|
||||||
|
{
|
||||||
|
if (cards.empty())
|
||||||
|
{
|
||||||
|
type = c0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
std::sort(cards.begin(), cards.end());
|
||||||
|
size = cards.size();
|
||||||
|
if (size == 2 && cards[0] == _S && cards[1] == _B)
|
||||||
|
{
|
||||||
|
type = c11;
|
||||||
|
}
|
||||||
|
else if (size < 5) // <20><><EFBFBD><EFBFBD>С<EFBFBD><D0A1>5<EFBFBD><35>
|
||||||
|
{
|
||||||
|
// <20><>β<EFBFBD><CEB2>ͬ <20><> ˫ <20><> ը
|
||||||
|
if (cards.front() == cards.back())
|
||||||
|
{
|
||||||
|
if (size == 1)
|
||||||
|
type = c1;
|
||||||
|
else if (size == 2)
|
||||||
|
type = c2;
|
||||||
|
else if (size == 3)
|
||||||
|
type = c3;
|
||||||
|
else if (size == 4)
|
||||||
|
type = c4;
|
||||||
|
max = cards[0];
|
||||||
|
}
|
||||||
|
else if (size == 4) // <20><><EFBFBD>Ų<EFBFBD>ͬ<EFBFBD><CDAC> <20><><EFBFBD><EFBFBD>һ?
|
||||||
|
{
|
||||||
|
if (cards[0] == cards[2])
|
||||||
|
type = c31, max = cards[0];
|
||||||
|
else if (cards[1] == cards[3])
|
||||||
|
type = c31, max = cards[1];
|
||||||
|
else
|
||||||
|
type = c0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (size >= 5) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>5<EFBFBD><35>
|
||||||
|
{
|
||||||
|
// std::vector<card_t> cards; Ҫʶ<D2AA><CAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
// arr[0] <20>ظ<EFBFBD>һ<EFBFBD>ε<EFBFBD><CEB5><EFBFBD>
|
||||||
|
// arr[1] <20>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD>ε<EFBFBD><CEB5><EFBFBD>
|
||||||
|
// arr[2] <20>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD>ε<EFBFBD><CEB5><EFBFBD>
|
||||||
|
// arr[3] <20>ظ<EFBFBD><D8B8>Ĵε<C4B4><CEB5><EFBFBD>
|
||||||
|
std::vector<card_t> arr[4];
|
||||||
|
for (int index = 0; index < size;)
|
||||||
|
{
|
||||||
|
card_t temp = cards[index++];
|
||||||
|
int count = 1;
|
||||||
|
for (; index < size && temp == cards[index]; ++index)
|
||||||
|
count++;
|
||||||
|
if (temp == _S || temp == _B && count > 1) // <20><><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6>ģ<EFBFBD>
|
||||||
|
type = c0;
|
||||||
|
if (count > 4) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>
|
||||||
|
type = c0;
|
||||||
|
else
|
||||||
|
arr[count - 1].push_back(temp);
|
||||||
|
}
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
||||||
|
if (size == 5 && arr[2].size() == 1 && arr[1].size() == 1)
|
||||||
|
type = c32, max = arr[2].front();
|
||||||
|
// <20>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD> 333345<34><35>666677
|
||||||
|
else if (size == 6 && arr[3].size() == 1)
|
||||||
|
type = c411, max = arr[3].front();
|
||||||
|
// <20>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
else if (size == 8 && arr[3].size() == 1 && arr[1].size() == 2)
|
||||||
|
type = c422, max = arr[3].front();
|
||||||
|
// <20><>˳
|
||||||
|
else if (size == arr[0].size()
|
||||||
|
&& arr[0].back() - arr[0].front() == size - 1 // <20><><EFBFBD><EFBFBD>һ<EFBFBD>ż<EFBFBD><C5BC><EFBFBD>һ<EFBFBD><D2BB> == <20><><EFBFBD><EFBFBD>-1
|
||||||
|
&& arr[0].back() < _2) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1>2
|
||||||
|
{
|
||||||
|
type = c123, max = arr[0].back();
|
||||||
|
}
|
||||||
|
// <20><><EFBFBD><EFBFBD>
|
||||||
|
else if (size / 2 >= 3 && (size % 2 == 0) // <20>ж<EFBFBD><D0B6>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>3<EFBFBD>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ż<EFBFBD><C5BC>
|
||||||
|
&& arr[1].size() == size / 2 // <20>Dz<EFBFBD><C7B2>Ƕ<EFBFBD><C7B6>Ƕ<EFBFBD><C7B6><EFBFBD>
|
||||||
|
&& arr[1].back() - arr[1].front() == size / 2 - 1 // <20><><EFBFBD><EFBFBD><EFBFBD>Dz<EFBFBD><C7B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>
|
||||||
|
&& arr[1].back() < _2) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1>2
|
||||||
|
{
|
||||||
|
type = c1122, max = arr[1].back();
|
||||||
|
}
|
||||||
|
// <20>ɻ<EFBFBD>
|
||||||
|
else if (arr[2].size() == size / 3
|
||||||
|
&& (size % 3 == 0)
|
||||||
|
&& arr[2].back() - arr[2].front() == (size / 3 - 1)
|
||||||
|
&& arr[2].back() < _2)
|
||||||
|
{
|
||||||
|
type = c111222, max = arr[2].back();
|
||||||
|
}
|
||||||
|
// <20>ɻ<EFBFBD><C9BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>
|
||||||
|
else if (arr[2].size() >= 2
|
||||||
|
&& arr[2].size() == size / 4
|
||||||
|
&& (size % 4 == 0)
|
||||||
|
&& arr[2].back() - arr[2].front() == size / 4 - 1
|
||||||
|
&& arr[2].back() < _2)
|
||||||
|
{
|
||||||
|
type = c11122234, max = arr[2].back();
|
||||||
|
}
|
||||||
|
// <20>ɻ<EFBFBD><C9BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ˫
|
||||||
|
else if (arr[2].size() >= 2
|
||||||
|
&& arr[2].size() == size / 5
|
||||||
|
&& (size % 5 == 0) // <20><>5<EFBFBD><35><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
&& arr[2].back() - arr[2].front() == size / 5 - 1 // <20>Ƿ<EFBFBD><C7B7><EFBFBD>
|
||||||
|
&& arr[1].size() == size / 5 // <20><><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>
|
||||||
|
&& arr[2].back() < _2)
|
||||||
|
{
|
||||||
|
type = c1112223344, max = arr[2].back();
|
||||||
|
}
|
||||||
|
// ʲô<CAB2><C3B4><EFBFBD><EFBFBD><EFBFBD>ǣ<EFBFBD><C7A3><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>
|
||||||
|
else
|
||||||
|
type = c0;
|
||||||
|
|
||||||
|
// <20><><EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ
|
||||||
|
if (type != c0)
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
for (int r = 3; r >= 0; --r)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < arr[r].size(); ++i)
|
||||||
|
{
|
||||||
|
for (int j = 0; j < r+1; ++j)
|
||||||
|
cards[index++] = arr[r][i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>5<EFBFBD><35> -- end
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PlayingCards::operator<(const PlayingCards & rhs) const
|
||||||
|
{
|
||||||
|
// <20><>ը
|
||||||
|
if (type == c11)
|
||||||
|
return false;
|
||||||
|
else if (rhs.type == c11)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// ը<><D5A8>
|
||||||
|
if (type == c4 && rhs.type != c4)
|
||||||
|
return false;
|
||||||
|
else if (type != c4 && rhs.type == c4)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// <20>ٶ<EFBFBD><D9B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>Ƚ<EFBFBD>Ȩֵ
|
||||||
|
return max < rhs.max;
|
||||||
|
}
|
41
Landlords/PlayingCards.h
Normal file
41
Landlords/PlayingCards.h
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "define.h"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
enum CardType {
|
||||||
|
c1, //<2F><><EFBFBD><EFBFBD>
|
||||||
|
c2, //<2F><><EFBFBD><EFBFBD>
|
||||||
|
c3, //3<><33><EFBFBD><EFBFBD>
|
||||||
|
c4, //ը<><D5A8>
|
||||||
|
c11, //<2F><>ը
|
||||||
|
c31, //3<><33>1
|
||||||
|
c32, //3<><33>2
|
||||||
|
c411, //4<><34>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
||||||
|
c422, //4<><34>2<EFBFBD><32>
|
||||||
|
c123, //<2F><><EFBFBD><EFBFBD>
|
||||||
|
c1122, //<2F><><EFBFBD><EFBFBD>
|
||||||
|
c111222, //<2F>ɻ<EFBFBD>
|
||||||
|
c11122234, //<2F>ɻ<EFBFBD><C9BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
c1112223344,//<2F>ɻ<EFBFBD><C9BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
c0 //<2F><><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class PlayingCards
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PlayingCards() = delete;
|
||||||
|
PlayingCards(const std::vector<card_t>& incards):cards(incards) { updata(); };
|
||||||
|
void updata();
|
||||||
|
std::vector<card_t> cards;
|
||||||
|
const std::vector<card_t> & getVec() const { return cards; }
|
||||||
|
CardType getType() const { return type; }
|
||||||
|
int getSize() const { return size; }
|
||||||
|
// <20>Ƚϴ<C8BD>С<EFBFBD><D0A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>
|
||||||
|
bool operator<(const PlayingCards& rhs) const;
|
||||||
|
private:
|
||||||
|
CardType type; // <20><><EFBFBD><EFBFBD>
|
||||||
|
card_t max; // Ȩֵ
|
||||||
|
int size; // <20>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
};
|
773
Landlords/Process.cpp
Normal file
773
Landlords/Process.cpp
Normal file
@@ -0,0 +1,773 @@
|
|||||||
|
#include "stdafx.h"
|
||||||
|
#include "Process.h"
|
||||||
|
using namespace std;
|
||||||
|
extern int ac;
|
||||||
|
string playerInfoToString(Player* pplayer)
|
||||||
|
{
|
||||||
|
ostringstream out;
|
||||||
|
if (pplayer == nullptr)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ" << endl;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
out << "<EFBFBD>dz<EFBFBD>:" << pplayer->getName() << '\t'
|
||||||
|
<< "id:" << pplayer->getID() << '\t'
|
||||||
|
<< "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:" << pplayer->getIntegral() << '\t';
|
||||||
|
roomID_t rid = pplayer->getCurrRoom();
|
||||||
|
if (rid != 0)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID:" << rid;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
string playerInfoToString(playerID_t pid)
|
||||||
|
{
|
||||||
|
ostringstream out;
|
||||||
|
auto pplayer = server().getPlayer(pid);
|
||||||
|
out << playerInfoToString(pplayer);
|
||||||
|
return out.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
string playerListToString()
|
||||||
|
{
|
||||||
|
ostringstream out;
|
||||||
|
for (auto i : server().getPlayerList())
|
||||||
|
{
|
||||||
|
out << playerInfoToString(&i) << endl;
|
||||||
|
}
|
||||||
|
return out.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
string roomInfoToString(roomID_t rid)
|
||||||
|
{
|
||||||
|
ostringstream out;
|
||||||
|
Room *proom = server().getRoom(rid);
|
||||||
|
if (proom == nullptr)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD>";
|
||||||
|
return out.str();
|
||||||
|
}
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id:" << proom->getID() << endl;
|
||||||
|
auto plist = proom->getPlayerIDList();
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:" << plist.size() << endl;
|
||||||
|
out << "<EFBFBD><EFBFBD>ϸ<EFBFBD><EFBFBD>Ϣ:" << endl;
|
||||||
|
for (auto i : plist)
|
||||||
|
{
|
||||||
|
auto pplayer = server().getPlayer(i);
|
||||||
|
if (pplayer == nullptr)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ" << endl;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
out << "<EFBFBD>dz<EFBFBD>:" << pplayer->getName()
|
||||||
|
<< "\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:" << pplayer->getIntegral()
|
||||||
|
<< (pplayer->isReady ? "\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" : "\tδ<EFBFBD><EFBFBD>")
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string roomListToString(bool isHideFull)
|
||||||
|
{
|
||||||
|
std::ostringstream out;
|
||||||
|
auto & vec = server().getRoomList();
|
||||||
|
if (vec.empty())
|
||||||
|
{
|
||||||
|
out << "[<5B><>]";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bool flag = false;
|
||||||
|
for (auto &i : vec)
|
||||||
|
{
|
||||||
|
if (isHideFull && i.full())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (flag == false)
|
||||||
|
{
|
||||||
|
out << "ID\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t״̬" << endl;
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
out << i.getID() << '\t' << i.getSize() << '/' << roomPlayerLimit << '\t';
|
||||||
|
if (i.getStatus() == roomStatus_t::Waiting)
|
||||||
|
out << "<EFBFBD>ȴ<EFBFBD><EFBFBD><EFBFBD>";
|
||||||
|
else if (i.getStatus() == roomStatus_t::playing)
|
||||||
|
out << "<EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD>";
|
||||||
|
out << endl;
|
||||||
|
}
|
||||||
|
if (flag == false)
|
||||||
|
out << "[<5B><>]";
|
||||||
|
}
|
||||||
|
return out.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline playerID_t QQToPID(uint64_t fromQQ)
|
||||||
|
{
|
||||||
|
return playerID_t(fromQQ);
|
||||||
|
}
|
||||||
|
inline uint64_t PIDToQQ(playerID_t pid)
|
||||||
|
{
|
||||||
|
return uint64_t(pid);
|
||||||
|
}
|
||||||
|
|
||||||
|
// <20>㲥<EFBFBD><E3B2A5>Ϣ<EFBFBD><CFA2>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID<49>ķ<EFBFBD><C4B7>䣨<EFBFBD><E4A3A8><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD>
|
||||||
|
void broadcast(playerID_t pid, const string& msg)
|
||||||
|
{
|
||||||
|
//logFile << "<22><><EFBFBD>Թ㲥<D4B9><E3B2A5><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>ָ<EFBFBD><D6B8>ID<49><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ң<EFBFBD>ָ<EFBFBD><D6B8>ID<49><44>" << pid << std::endl;
|
||||||
|
Player * pplayer = server().getPlayer(pid);
|
||||||
|
if (pplayer == nullptr)
|
||||||
|
{
|
||||||
|
logFile << "û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Room *proom = server().getRoom(pplayer->getCurrRoom());
|
||||||
|
if (proom == nullptr)
|
||||||
|
{
|
||||||
|
logFile << "û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (const auto i : proom->getPlayerIDList())
|
||||||
|
{
|
||||||
|
if (pid != i)
|
||||||
|
{
|
||||||
|
// logFile << "<22><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>pid:" << i;
|
||||||
|
CQ_sendPrivateMsg(ac, PIDToQQ(i), msg.c_str());
|
||||||
|
// logFile << " --- <20><><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// <20>㲥<EFBFBD><E3B2A5>Ϣ<EFBFBD><CFA2>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID<49>ķ<EFBFBD><C4B7>䣨<EFBFBD><E4A3A8><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD>
|
||||||
|
void broadcast(roomID_t rid, const string& msg)
|
||||||
|
{
|
||||||
|
//logFile << "<22><><EFBFBD>Թ㲥<D4B9><E3B2A5><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ң<EFBFBD><D2A3><EFBFBD><EFBFBD><EFBFBD>ID<49><44>" << rid << std::endl;
|
||||||
|
|
||||||
|
Room *proom = server().getRoom(rid);
|
||||||
|
if (proom == nullptr)
|
||||||
|
{
|
||||||
|
logFile << "û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (const auto i : proom->getPlayerIDList())
|
||||||
|
{
|
||||||
|
// logFile << "<22><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>pid:" << i;
|
||||||
|
CQ_sendPrivateMsg(ac, PIDToQQ(i), msg.c_str());
|
||||||
|
// logFile << " --- <20><><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void instruction(uint64_t fromQQ, string msg)
|
||||||
|
{
|
||||||
|
ostringstream out;
|
||||||
|
playerID_t pid = QQToPID(fromQQ);
|
||||||
|
Player *pplayer = server().getPlayer(pid);
|
||||||
|
|
||||||
|
|
||||||
|
if (msg == "<EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
if (server().playerReady(pid))
|
||||||
|
{
|
||||||
|
if (pplayer->isReady)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
||||||
|
roomID_t rid = pplayer->getCurrRoom();
|
||||||
|
broadcast(pid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>Ϸ<EFBFBD>˾ͷ<CBBE><CDB7>Ƹ<EFBFBD><C6B8><EFBFBD><EFBFBD>ң<EFBFBD><D2A3><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD>
|
||||||
|
if (server().startGame(rid))
|
||||||
|
{
|
||||||
|
broadcast(rid, "<EFBFBD><EFBFBD>Ϸ<EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>");
|
||||||
|
broadcast(rid, roomCardsToString(rid));
|
||||||
|
Room *proom = server().getRoom(rid);
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҿ<EFBFBD><D2BF><EFBFBD>
|
||||||
|
for (auto pid : proom->getPlayerIDList())
|
||||||
|
CQ_sendPrivateMsg(ac, PIDToQQ(pid), CardsToString(proom->getPlayerCards(pid)).c_str());
|
||||||
|
NotifyNextPlayer(rid, "<EFBFBD>Ƿ<EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD> [<5B>е<EFBFBD><D0B5><EFBFBD>] [<5B><><EFBFBD><EFBFBD>]", "<EFBFBD>ȴ<EFBFBD>[" + server().getPlayer(proom->getThisTurn())->getName() + "]<5D>е<EFBFBD><D0B5><EFBFBD>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
out << "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>";
|
||||||
|
broadcast(pid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
}
|
||||||
|
broadcast(pplayer->getCurrRoom(), string("<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>\n") + roomInfoToString(pplayer->getCurrRoom()));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (msg == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
roomID_t rid = server().createRoom(pid);
|
||||||
|
if (rid != 0)
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>";
|
||||||
|
else
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>";
|
||||||
|
}
|
||||||
|
else if (msg.substr(0, 4) == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") {
|
||||||
|
std::istringstream tempin(msg.substr(4));
|
||||||
|
roomID_t rid = 0;
|
||||||
|
tempin >> rid;
|
||||||
|
if (tempin.bad())
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>+ID" << endl;
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1";
|
||||||
|
}
|
||||||
|
else if (server().joinRoom(pid, rid))
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD>뷿<EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>";
|
||||||
|
broadcast(pid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҽ<EFBFBD><EFBFBD>룡");
|
||||||
|
broadcast(rid, string("<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>\n") + roomInfoToString(rid));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD>뷿<EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (msg == "<EFBFBD>˳<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
roomID_t rid = pplayer->getCurrRoom();
|
||||||
|
if (server().leaveRoom(pid))
|
||||||
|
{
|
||||||
|
out << "<EFBFBD>˳<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>";
|
||||||
|
if (server().getRoom(rid))
|
||||||
|
{
|
||||||
|
broadcast(rid, string("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><EFBFBD><EFBFBD>\n<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>\n") + roomInfoToString(rid));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
out << "<EFBFBD>˳<EFBFBD>ʧ<EFBFBD><EFBFBD>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (msg == "<EFBFBD>鿴<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
roomID_t rid = pplayer->getCurrRoom();
|
||||||
|
if (rid == 0)
|
||||||
|
out << "<EFBFBD>㵱ǰ<EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>鿴<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
||||||
|
else
|
||||||
|
out << roomInfoToString(rid);
|
||||||
|
}
|
||||||
|
else if (msg.substr(0, 8) == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>")
|
||||||
|
{
|
||||||
|
if (msg[8] == '1')
|
||||||
|
{
|
||||||
|
out << roomListToString(true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
out << roomListToString(false);
|
||||||
|
out << "\n<EFBFBD><EFBFBD> *<2A><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (msg == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>")
|
||||||
|
{
|
||||||
|
out << playerListToString();
|
||||||
|
}
|
||||||
|
else if (pplayer->getCurrRoom() != 0)
|
||||||
|
{
|
||||||
|
msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>[" + pplayer->getName() + "]˵<><CBB5>" + msg;
|
||||||
|
broadcast(pplayer->getCurrRoom(), msg.c_str());
|
||||||
|
}
|
||||||
|
CQ_sendPrivateMsg(ac, fromQQ, out.str().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string roomCardsToString(roomID_t rid)
|
||||||
|
{
|
||||||
|
ostringstream out;
|
||||||
|
Room *proom = server().getRoom(rid);
|
||||||
|
if (proom == nullptr)
|
||||||
|
out << "δ<EFBFBD><EFBFBD><EFBFBD>뷿<EFBFBD><EFBFBD>";
|
||||||
|
else if (proom->getStatus() != roomStatus_t::playing)
|
||||||
|
out << "<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>Ϸ";
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (auto pid : proom->getPlayerIDList())
|
||||||
|
{
|
||||||
|
Player *pplayer = server().getPlayer(pid);
|
||||||
|
if (proom->getLandID() != 0)
|
||||||
|
{
|
||||||
|
if (proom->getLandID() == pid)
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
||||||
|
else
|
||||||
|
out << "ũ<EFBFBD><EFBFBD>";
|
||||||
|
}
|
||||||
|
out << '[' << pplayer->getName() << "]\tʣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << proom->getPlayerCardsSize(pid) << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CardToString(card_t card)
|
||||||
|
{
|
||||||
|
std::string str;
|
||||||
|
switch (card)
|
||||||
|
{
|
||||||
|
case _3:str = " 3";break;
|
||||||
|
case _4:str = " 4";break;
|
||||||
|
case _5:str = " 5";break;
|
||||||
|
case _6:str = " 6";break;
|
||||||
|
case _7:str = " 7";break;
|
||||||
|
case _8:str = " 8";break;
|
||||||
|
case _9:str = " 9";break;
|
||||||
|
case _10:str = "10";break;
|
||||||
|
case _J:str = " J";break;
|
||||||
|
case _Q:str = " Q";break;
|
||||||
|
case _K:str = " K";break;
|
||||||
|
case _A:str = " A";break;
|
||||||
|
case _2:str = " 2";break;
|
||||||
|
case _S:str = "С";break;
|
||||||
|
case _B:str = "<EFBFBD><EFBFBD>"; break;
|
||||||
|
}
|
||||||
|
str = "[" + str + "]";
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CardsToString(const vector<card_t> &cards)
|
||||||
|
{
|
||||||
|
ostringstream out;
|
||||||
|
for (auto i : cards)
|
||||||
|
{
|
||||||
|
out << CardToString(i);
|
||||||
|
}
|
||||||
|
return out.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CardTtypeToString(CardType ct)
|
||||||
|
{
|
||||||
|
std::string str;
|
||||||
|
switch (ct)
|
||||||
|
{
|
||||||
|
case c1: str = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||||
|
case c2: str = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||||
|
case c3: str = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||||
|
case c4: str = "ը<EFBFBD><EFBFBD>"; break;
|
||||||
|
case c11: str = "<EFBFBD><EFBFBD>ը"; break;
|
||||||
|
case c31: str = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ"; break;
|
||||||
|
case c32: str = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||||
|
case c411: str = "<EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||||
|
case c422: str = "<EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||||
|
case c123: str = "˳<EFBFBD><EFBFBD>"; break;
|
||||||
|
case c1122: str = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||||
|
case c111222: str = "<EFBFBD>ɻ<EFBFBD>"; break;
|
||||||
|
case c11122234: str = "<EFBFBD>ɻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||||
|
case c1112223344: str = "<EFBFBD>ɻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||||
|
case c0: str = "<EFBFBD><EFBFBD><EFBFBD>ܳ<EFBFBD><EFBFBD><EFBFBD>"; break;
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
vector< card_t > StringToCards(const string src) {
|
||||||
|
vector< card_t > cards;
|
||||||
|
card_t temp;
|
||||||
|
for (size_t i = 0; i < src.size(); ++i) {
|
||||||
|
if (src[i] == '1' && src[i + 1] == '0') {
|
||||||
|
i++;
|
||||||
|
temp = _10;
|
||||||
|
}
|
||||||
|
else if (src.substr(i, i + 4) == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") {
|
||||||
|
i += 3;
|
||||||
|
temp = _B;
|
||||||
|
}
|
||||||
|
else if (src.substr(i, i + 2) == "<EFBFBD><EFBFBD>"){
|
||||||
|
i += 1;
|
||||||
|
temp = _B;
|
||||||
|
}
|
||||||
|
else if (src.substr(i, i + 4) == "С<EFBFBD><EFBFBD>") {
|
||||||
|
i += 3;
|
||||||
|
temp = _S;
|
||||||
|
}
|
||||||
|
else if (src.substr(i, i + 2) == "С") {
|
||||||
|
i += 1;
|
||||||
|
temp = _S;
|
||||||
|
}
|
||||||
|
else if (src.substr(i, i + 4) == "<EFBFBD><EFBFBD>ը") {
|
||||||
|
cards.push_back(_B);
|
||||||
|
cards.push_back(_S);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
switch (src[i]) {
|
||||||
|
case 'a':
|
||||||
|
case 'A':
|
||||||
|
temp = _A;
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
temp = _2;
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
temp = _3;
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
temp = _4;
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
temp = _5;
|
||||||
|
break;
|
||||||
|
case '6':
|
||||||
|
temp = _6;
|
||||||
|
break;
|
||||||
|
case '7':
|
||||||
|
temp = _7;
|
||||||
|
break;
|
||||||
|
case '8':
|
||||||
|
temp = _8;
|
||||||
|
break;
|
||||||
|
case '9':
|
||||||
|
temp = _9;
|
||||||
|
break;
|
||||||
|
case 'j':
|
||||||
|
case 'J':
|
||||||
|
temp = _J;
|
||||||
|
break;
|
||||||
|
case 'q':
|
||||||
|
case 'Q':
|
||||||
|
temp = _Q;
|
||||||
|
break;
|
||||||
|
case 'k':
|
||||||
|
case 'K':
|
||||||
|
temp = _K;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cards.push_back(temp);
|
||||||
|
}
|
||||||
|
return cards;
|
||||||
|
}
|
||||||
|
|
||||||
|
void becomeLandlord(Room * proom)
|
||||||
|
{
|
||||||
|
ostringstream out;
|
||||||
|
Player * pLand = server().getPlayer(proom->getLandID());
|
||||||
|
broadcast(pLand->getID(), "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>[" + pLand->getName() + "]<5D><>Ϊ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>\n";
|
||||||
|
out << CardsToString(proom->getPlayerCards(pLand->getID()));
|
||||||
|
string temp;
|
||||||
|
for (auto i : proom->getLandCards())
|
||||||
|
temp += CardToString(i);
|
||||||
|
broadcast(proom->getID(), "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>" + temp);
|
||||||
|
CQ_sendPrivateMsg(ac, PIDToQQ(pLand->getID()), out.str().c_str());
|
||||||
|
NotifyNextPlayer(proom->getID(), "<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD>ȴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
// <20><><EFBFBD><EFBFBD> msg <20>Ƿ<EFBFBD><C7B7><EFBFBD><CDB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>Ϣ
|
||||||
|
// <20><><EFBFBD><EFBFBD> otherMsg <20>Ƿ<EFBFBD><C7B7><EFBFBD><CDB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>Ϣ
|
||||||
|
void NotifyNextPlayer(roomID_t rid, std::string msg, std::string otherMsg)
|
||||||
|
{
|
||||||
|
Room * proom = server().getRoom(rid);
|
||||||
|
for (auto pid : proom->getPlayerIDList())
|
||||||
|
{
|
||||||
|
if (proom->getThisTurn() == pid)
|
||||||
|
{
|
||||||
|
CQ_sendPrivateMsg(ac, PIDToQQ(pid), msg.c_str());
|
||||||
|
CQ_sendPrivateMsg(ac, PIDToQQ(pid), CardsToString(proom->getPlayerCards(pid)).c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CQ_sendPrivateMsg(ac, PIDToQQ(pid), otherMsg.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// <20><>Ϸָ<CFB7><D6B8>
|
||||||
|
void gameCommand(uint64_t fromQQ, string msg)
|
||||||
|
{
|
||||||
|
ostringstream out;
|
||||||
|
playerID_t pid = QQToPID(fromQQ);
|
||||||
|
Player *pplayer = server().getPlayer(pid);
|
||||||
|
roomID_t rid = pplayer->getCurrRoom();
|
||||||
|
Room * proom = server().getRoom(rid);
|
||||||
|
do {/******************** do while <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ************************/
|
||||||
|
if (pplayer == nullptr ||
|
||||||
|
proom == nullptr ||
|
||||||
|
proom->getStatus() != roomStatus_t::playing)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD>ǰ״̬<EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ״̬<EFBFBD>²ſ<EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (msg == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
out << roomCardsToString(rid);
|
||||||
|
out << CardsToString(proom->getPlayerCards(pid));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (msg == "<EFBFBD><EFBFBD>" || msg == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" || msg == "<EFBFBD>е<EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
if (proom->getLandID() != 0)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĽΣ<EFBFBD>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (proom->getThisTurn() != pid)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD>û<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD>Ŷ<EFBFBD><EFBFBD>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (proom->isColledLand())
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĽΣ<EFBFBD>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (msg == "<EFBFBD><EFBFBD>" || msg == "<EFBFBD>е<EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
proom->coll(true);
|
||||||
|
broadcast(pid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>["+pplayer->getName()+"]<5D>е<EFBFBD><D0B5><EFBFBD>");
|
||||||
|
|
||||||
|
if (proom->getLandID() == pid)
|
||||||
|
{
|
||||||
|
becomeLandlord(proom);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NotifyNextPlayer(rid, "<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] [<5B><><EFBFBD><EFBFBD>]", "<EFBFBD>ȴ<EFBFBD>[" + server().getPlayer(proom->getThisTurn())->getName() + "]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!proom->coll(false)) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼٱ<D8BC>ʾû<CABE>˽е<CBBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6>ؿ<EFBFBD><D8BF><EFBFBD>Ϸ
|
||||||
|
{
|
||||||
|
broadcast(rid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD>û<EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؿ<EFBFBD>");
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҿ<EFBFBD><D2BF><EFBFBD>
|
||||||
|
for (auto pid : proom->getPlayerIDList())
|
||||||
|
CQ_sendPrivateMsg(ac, PIDToQQ(pid), CardsToString(proom->getPlayerCards(pid)).c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
out << "<EFBFBD>㲻<EFBFBD>е<EFBFBD><EFBFBD><EFBFBD>";
|
||||||
|
broadcast(pid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>[" + pplayer->getName() + "]<5D><><EFBFBD>е<EFBFBD><D0B5><EFBFBD>");
|
||||||
|
}
|
||||||
|
NotifyNextPlayer(rid, "<EFBFBD>Ƿ<EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD> [<5B>е<EFBFBD><D0B5><EFBFBD>] [<5B><><EFBFBD><EFBFBD>]", "<EFBFBD>ȴ<EFBFBD>[" + server().getPlayer(proom->getThisTurn())->getName() + "]<5D>е<EFBFBD><D0B5><EFBFBD>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (msg == "<EFBFBD><EFBFBD>" || msg == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||||
|
|| msg == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" || msg == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
if (proom->getLandID() != 0)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĽΣ<EFBFBD>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (proom->getThisTurn() != pid)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD>û<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD>Ŷ<EFBFBD><EFBFBD>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!proom->isColledLand())
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǽе<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĽΣ<EFBFBD>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (msg == "<EFBFBD><EFBFBD>" || msg == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" || msg == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
broadcast(pid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>[" + pplayer->getName() + "]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
if (proom->grab(true))
|
||||||
|
{
|
||||||
|
becomeLandlord(proom);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
NotifyNextPlayer(rid, "<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] [<5B><><EFBFBD><EFBFBD>]", "<EFBFBD>ȴ<EFBFBD>[" + server().getPlayer(proom->getThisTurn())->getName() + "]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
broadcast(pid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>[" + pplayer->getName() + "]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
if (proom->grab(false))
|
||||||
|
{
|
||||||
|
becomeLandlord(proom);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
NotifyNextPlayer(rid, "<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] [<5B><><EFBFBD><EFBFBD>]", "<EFBFBD>ȴ<EFBFBD>[" + server().getPlayer(proom->getThisTurn())->getName() + "]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (msg.substr(0, 2) == "<EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
if (proom->getLandID() == 0)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD>ڻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĽΣ<EFBFBD>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (proom->getThisTurn() != pid)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD>û<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD>Ŷ<EFBFBD><EFBFBD>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
vector<card_t> vec = StringToCards(msg.substr(2));
|
||||||
|
PlayingCards pc(vec);
|
||||||
|
logFile << CardsToString(vec) << std::endl;
|
||||||
|
if (pc.getType() == c0)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
||||||
|
}
|
||||||
|
if (proom->popCards(pc))
|
||||||
|
{
|
||||||
|
ostringstream outTemp;
|
||||||
|
outTemp << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>[";
|
||||||
|
outTemp << pplayer->getName();
|
||||||
|
outTemp << "]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>[";
|
||||||
|
outTemp << CardTtypeToString(pc.getType());
|
||||||
|
outTemp << "]\n";
|
||||||
|
outTemp << CardsToString(vec);
|
||||||
|
broadcast(rid, outTemp.str());
|
||||||
|
outTemp.str("");
|
||||||
|
if (proom->isEndGame())
|
||||||
|
{
|
||||||
|
outTemp << "<EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;;
|
||||||
|
if (pplayer->getID() == proom->getLandID())
|
||||||
|
outTemp << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
else
|
||||||
|
outTemp << "ũ<EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
for (auto pid : proom->getPlayerIDList())
|
||||||
|
{
|
||||||
|
int score = proom->settle(pid);
|
||||||
|
Player *pPlayerTemp = server().getPlayer(pid);
|
||||||
|
pPlayerTemp->score(score);
|
||||||
|
outTemp << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>[" << pPlayerTemp->getName() << "] <20>÷<EFBFBD>:" << score << std::endl;
|
||||||
|
}
|
||||||
|
outTemp << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>鿴<EFBFBD><E9BFB4><EFBFBD><EFBFBD> <20><><EFBFBD>鿴<EFBFBD><E9BFB4>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>鿴 <20><><EFBFBD>鿴<EFBFBD><E9BFB4>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ";
|
||||||
|
broadcast(rid, outTemp.str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (proom->isPopCards())
|
||||||
|
NotifyNextPlayer(rid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [<5B><> xxx]", "<EFBFBD>ȴ<EFBFBD>[" + server().getPlayer(proom->getThisTurn())->getName() + "]<5D><><EFBFBD><EFBFBD>");
|
||||||
|
else
|
||||||
|
NotifyNextPlayer(rid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [<5B><> xxx] [<5B><><EFBFBD><EFBFBD>]", "<EFBFBD>ȴ<EFBFBD>[" + server().getPlayer(proom->getThisTurn())->getName() + "]<5D><><EFBFBD><EFBFBD>");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>ϼҴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϼҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>\n";
|
||||||
|
out << CardsToString(proom->getLastRoundCards());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (msg == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" || msg == "<EFBFBD><EFBFBD>Ҫ" || msg == "Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
if (proom->getLandID() == 0)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD>ڻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĽΣ<EFBFBD>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (proom->getThisTurn() != pid)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD>û<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD>Ŷ<EFBFBD><EFBFBD>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (proom->pass())
|
||||||
|
{
|
||||||
|
broadcast(rid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>[" + pplayer->getName() + "]<5D><><EFBFBD><EFBFBD>");
|
||||||
|
if (proom->isPopCards())
|
||||||
|
NotifyNextPlayer(rid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [<5B><> xxx]", "<EFBFBD>ȴ<EFBFBD>[" + server().getPlayer(proom->getThisTurn())->getName() + "]<5D><><EFBFBD><EFBFBD>");
|
||||||
|
else
|
||||||
|
NotifyNextPlayer(rid, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [<5B><> xxx] [<5B><><EFBFBD><EFBFBD>]", "<EFBFBD>ȴ<EFBFBD>[" + server().getPlayer(proom->getThisTurn())->getName() + "]<5D><><EFBFBD><EFBFBD>");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dz<EFBFBD><EFBFBD>ƽΣ<EFBFBD><EFBFBD><EFBFBD>pass<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (msg == "ǿ<EFBFBD><EFBFBD><EFBFBD>ؿ<EFBFBD>")
|
||||||
|
{
|
||||||
|
logFile << "ǿ<EFBFBD><EFBFBD><EFBFBD>ؿ<EFBFBD><EFBFBD><EFBFBD>Ϸ";
|
||||||
|
broadcast(rid, "ǿ<EFBFBD><EFBFBD><EFBFBD>ؿ<EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>鿴<EFBFBD><E9BFB4><EFBFBD><EFBFBD>");
|
||||||
|
proom->start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>[" + pplayer->getName() + "]˵<><CBB5>" + msg;
|
||||||
|
broadcast(rid, msg.c_str());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}while(0);/************** do while <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ****************/
|
||||||
|
CQ_sendPrivateMsg(ac, fromQQ, out.str().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
void Receive(uint64_t fromQQ, string msg)
|
||||||
|
{
|
||||||
|
ostringstream out;
|
||||||
|
playerID_t pid = QQToPID(fromQQ);
|
||||||
|
Player *pplayer = server().getPlayer(pid);
|
||||||
|
if (msg.substr(0, 4) == "ע<EFBFBD><EFBFBD>" && pplayer == nullptr)
|
||||||
|
{
|
||||||
|
string name;
|
||||||
|
istringstream in(msg.substr(4));
|
||||||
|
in >> name;
|
||||||
|
Player temp(pid);
|
||||||
|
temp.setName(name.substr(0, 12));
|
||||||
|
if (server().loginPlayer(temp))
|
||||||
|
{
|
||||||
|
out << "ע<EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>dzƣ<EFBFBD>" << name << std::endl;
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˵<EFBFBD> <20><><EFBFBD>õ<EFBFBD>ָ<EFBFBD><D6B8><EFBFBD>б<EFBFBD>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
out << "ע<EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>";
|
||||||
|
}
|
||||||
|
CQ_sendPrivateMsg(ac, fromQQ, out.str().c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pplayer == nullptr)
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD>ǰQQδע<EFBFBD>ᣬ<EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD> ע<><D7A2> <20>dz<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD>ᣡ" << std::endl;
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD>ע<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
out << "<EFBFBD><EFBFBD>ע<EFBFBD>⣬<EFBFBD>dz<EFBFBD><EFBFBD>6<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><EFBFBD><EFBFBD>12<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸ,ע<><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>пո<D0BF>";
|
||||||
|
CQ_sendPrivateMsg(ac, fromQQ, out.str().c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Room *proom = server().getRoom(pplayer->getCurrRoom());
|
||||||
|
if (msg == "<EFBFBD>˵<EFBFBD>")
|
||||||
|
{
|
||||||
|
out <<
|
||||||
|
"+--------ָ<><D6B8><EFBFBD>б<EFBFBD>--------+\n"
|
||||||
|
"| <20>˵<EFBFBD> -- <20><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD>б<EFBFBD> |\n"
|
||||||
|
"| ע<><D7A2> -- ע<><D7A2> <20>dz<EFBFBD> |\n"
|
||||||
|
"| <20><><EFBFBD><EFBFBD> -- <20><><EFBFBD><EFBFBD> <20><><EFBFBD>dz<EFBFBD> |\n"
|
||||||
|
"| <20>鿴 -- <20>鿴<EFBFBD><E9BFB4>ǰ<EFBFBD><C7B0>Ϣ |\n"
|
||||||
|
"| <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -- β<><CEB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |\n"
|
||||||
|
"| [<5B><>Ϣ] -- <20>ڷ<EFBFBD><DAB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |\n"
|
||||||
|
"|---- <20><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8> ----|\n"
|
||||||
|
"|<><D7BC> -- <20><><EFBFBD><EFBFBD><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>|\n"
|
||||||
|
"|<7C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -- <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|\n"
|
||||||
|
"|<7C><><EFBFBD><EFBFBD>[id] -- <20><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|\n"
|
||||||
|
"|<7C>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD> -- <20>˳<EFBFBD><CBB3><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>|\n"
|
||||||
|
"|<7C>鿴<EFBFBD><E9BFB4><EFBFBD><EFBFBD> -- <20>鿴<EFBFBD><E9BFB4>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>|\n"
|
||||||
|
"|<7C><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD> -- <20>鿴<EFBFBD><E9BFB4><EFBFBD>з<EFBFBD><D0B7><EFBFBD>|\n"
|
||||||
|
"|<7C><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD> -- <20>鿴<EFBFBD><E9BFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|\n"
|
||||||
|
"|*ע<><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD>Ϸ<EFBFBD>н<EFBFBD><D0BD><EFBFBD>*|\n"
|
||||||
|
"|---- <20><>Ϸָ<CFB7><D6B8> ----|\n"
|
||||||
|
"|<7C><><EFBFBD><EFBFBD> -- <20>鿴<EFBFBD><E9BFB4>ǰ<EFBFBD>ƾ<EFBFBD><C6BE><EFBFBD><EFBFBD><EFBFBD>|\n"
|
||||||
|
"|<7C>е<EFBFBD><D0B5><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>|\n"
|
||||||
|
"|<7C><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><> xxxx |\n"
|
||||||
|
"|*ע<><D7A2><EFBFBD><EFBFBD>Ϸָ<CFB7><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>н<EFBFBD><D0BD><EFBFBD>*|\n"
|
||||||
|
"+--------ָ<><D6B8><EFBFBD>б<EFBFBD>--------+";
|
||||||
|
}
|
||||||
|
else if (msg == "<EFBFBD>鿴")
|
||||||
|
{
|
||||||
|
out << playerInfoToString(pid);
|
||||||
|
}
|
||||||
|
else if (msg.substr(0, 4) == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
string name;
|
||||||
|
istringstream in(msg.substr(4));
|
||||||
|
in >> name;
|
||||||
|
pplayer->setName(name.substr(0, 12));
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD>dz<EFBFBD>:" << name;
|
||||||
|
}
|
||||||
|
else if (msg == "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
{
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵĹ<EFBFBD><EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>";
|
||||||
|
}
|
||||||
|
else if (proom == nullptr || proom->getStatus() != roomStatus_t::playing)
|
||||||
|
instruction(fromQQ, msg);
|
||||||
|
else if (proom->getStatus() == roomStatus_t::playing)
|
||||||
|
gameCommand(fromQQ, msg);
|
||||||
|
else
|
||||||
|
out << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˵<EFBFBD> <20><><EFBFBD>õ<EFBFBD>ָ<EFBFBD><D6B8><EFBFBD>б<EFBFBD>";
|
||||||
|
CQ_sendPrivateMsg(ac, fromQQ, out.str().c_str());
|
||||||
|
}
|
42
Landlords/Process.h
Normal file
42
Landlords/Process.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "cqp.h"
|
||||||
|
#include "Server.h"
|
||||||
|
#include "Room.h"
|
||||||
|
#include "Player.h"
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <sstream>
|
||||||
|
std::string playerInfoToString(Player* pplayer);
|
||||||
|
std::string playerInfoToString(playerID_t pid);
|
||||||
|
std::string playerListToString();
|
||||||
|
std::string roomInfoToString(roomID_t rid);
|
||||||
|
|
||||||
|
std::string roomListToString(bool isHideFull);
|
||||||
|
|
||||||
|
inline playerID_t QQToPID(uint64_t fromQQ);
|
||||||
|
|
||||||
|
inline uint64_t PIDToQQ(playerID_t pid);
|
||||||
|
|
||||||
|
// <20>㲥<EFBFBD><E3B2A5>Ϣ<EFBFBD><CFA2>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID<49>ķ<EFBFBD><C4B7>䣨<EFBFBD><E4A3A8><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD>
|
||||||
|
void broadcast(playerID_t pid, const std::string& msg);
|
||||||
|
|
||||||
|
// <20>㲥<EFBFBD><E3B2A5>Ϣ<EFBFBD><CFA2>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID<49>ķ<EFBFBD><C4B7>䣨<EFBFBD><E4A3A8><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD>
|
||||||
|
void broadcast(roomID_t rid, const std::string& msg);
|
||||||
|
|
||||||
|
|
||||||
|
void instruction(uint64_t fromQQ, std::string msg);
|
||||||
|
|
||||||
|
std::string roomCardsToString(roomID_t rid);
|
||||||
|
|
||||||
|
std::string CardToString(card_t card);
|
||||||
|
|
||||||
|
std::string CardsToString(const std::vector<card_t> &cards);
|
||||||
|
void becomeLandlord(Room * proom);
|
||||||
|
|
||||||
|
// ֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
// <20><><EFBFBD><EFBFBD> msg <20>Ƿ<EFBFBD><C7B7><EFBFBD><CDB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>Ϣ
|
||||||
|
// <20><><EFBFBD><EFBFBD> otherMsg <20>Ƿ<EFBFBD><C7B7><EFBFBD><CDB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>Ϣ
|
||||||
|
void NotifyNextPlayer(roomID_t rid, std::string msg, std::string otherMsg);
|
||||||
|
void gameCommand(uint64_t fromQQ, std::string msg);
|
||||||
|
|
||||||
|
void Receive(uint64_t fromQQ, std::string msg);
|
352
Landlords/Room.cpp
Normal file
352
Landlords/Room.cpp
Normal file
@@ -0,0 +1,352 @@
|
|||||||
|
#include "stdafx.h"
|
||||||
|
#include "Room.h"
|
||||||
|
|
||||||
|
|
||||||
|
Room::Room(roomID_t rid, playerID_t pid) :
|
||||||
|
m_id(rid), m_roomStatus(roomStatus_t::Waiting), m_PIDList(),
|
||||||
|
m_turn(0), m_landlord(0), m_X(100), m_lastRoundCards(std::vector<card_t>())
|
||||||
|
{
|
||||||
|
logFile << "Room::Room(" << rid << ", " << pid << ")\n";
|
||||||
|
playerJoin(pid);
|
||||||
|
int n = 0;
|
||||||
|
for (int i = 0; i < 52; ++i)
|
||||||
|
{
|
||||||
|
if (i % 4 == 0)
|
||||||
|
++n;
|
||||||
|
m_cards[i] = card_t(n);
|
||||||
|
}
|
||||||
|
m_cards[52] = card_t::_S;
|
||||||
|
m_cards[53] = card_t::_B;
|
||||||
|
}
|
||||||
|
|
||||||
|
Room::~Room()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Room::playerJoin(playerID_t pid)
|
||||||
|
{
|
||||||
|
//logFile << "<22><><EFBFBD><EFBFBD>ID:<" << pid << "><3E><>ͼ<EFBFBD><CDBC><EFBFBD>뷿<EFBFBD><EBB7BF>:" << m_id << std::endl;
|
||||||
|
if (m_PIDList.size() == 3)
|
||||||
|
{
|
||||||
|
logFile << m_id << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
m_PIDList.push_back(pid);
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID:<" << pid << "><3E>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>뷿<EFBFBD><EBB7BF>:" << m_id << std::endl;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Room::playerLeave(playerID_t pid)
|
||||||
|
{
|
||||||
|
//logFile << "<22><><EFBFBD><EFBFBD>ID:<" << pid << "><3E><>ͼ<EFBFBD>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD>:" << m_id << std::endl;
|
||||||
|
if (m_PIDList.empty())
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
auto it = std::find(m_PIDList.begin(), m_PIDList.end(), pid);
|
||||||
|
if (it == m_PIDList.end())
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD>ڸ÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
m_PIDList.erase(it);
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID:<" << pid << "><3E>Ѿ<EFBFBD><D1BE>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD>:" << m_id << std::endl;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Room::start()
|
||||||
|
{
|
||||||
|
m_roomStatus = roomStatus_t::playing;
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID<" << m_id << "><3E>Ѿ<EFBFBD><D1BE><EFBFBD>ʼ<EFBFBD><CABC>Ϸ" << std::endl;
|
||||||
|
m_landlord = -1; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>Ϊ<EFBFBD><CEAA>
|
||||||
|
m_lastPop = -1;
|
||||||
|
m_first = -1;
|
||||||
|
m_turn = landU(e); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>˿<EFBFBD>ʼ
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << m_turn << std::endl;
|
||||||
|
m_multiple = 1;
|
||||||
|
for (int i = 0; i < roomPlayerLimit; ++i)
|
||||||
|
m_Grad[i] = true;
|
||||||
|
Refresh(); // ϴ<><CFB4>
|
||||||
|
distribution(); // <20><><EFBFBD><EFBFBD>
|
||||||
|
}
|
||||||
|
|
||||||
|
std::array<card_t, 3> Room::getLandCards()
|
||||||
|
{
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǵ<EFBFBD><C7B5><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
return std::array<card_t, 3>{m_cards[51], m_cards[52], m_cards[53]};
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::vector<card_t>& Room::getPlayerCards(playerID_t pid)
|
||||||
|
{
|
||||||
|
//logFile << "<22><><EFBFBD><EFBFBD>ID<" << pid << "><3E><><EFBFBD>Եõ<D4B5><C3B5>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return m_playerCards[findPlayer(pid)];
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t Room::getPlayerCardsSize(playerID_t pid)
|
||||||
|
{
|
||||||
|
//logFile << "<22><><EFBFBD><EFBFBD>ID<" << pid << "><3E><><EFBFBD>Եõ<D4B5><C3B5>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return m_playerCards[findPlayer(pid)].size();
|
||||||
|
}
|
||||||
|
|
||||||
|
int Room::settle(playerID_t pid)
|
||||||
|
{
|
||||||
|
int score = m_X * m_multiple;
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
if (pid == getLandID()) // <20><><EFBFBD><EFBFBD><EFBFBD>ǵ<EFBFBD><C7B5><EFBFBD>
|
||||||
|
{
|
||||||
|
score *= 2; // <20><><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
|
||||||
|
if (m_turn != m_landlord) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƵIJ<C6B5><C4B2>ǵ<EFBFBD><C7B5><EFBFBD>
|
||||||
|
score = -score; // <20>۷<EFBFBD>
|
||||||
|
}
|
||||||
|
else { // <20><><EFBFBD>ǵ<EFBFBD><C7B5><EFBFBD>
|
||||||
|
if (m_turn == m_landlord) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>ǵ<EFBFBD><C7B5><EFBFBD>
|
||||||
|
score = -score; // <20>۷<EFBFBD>
|
||||||
|
}
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Room::findPlayer(playerID_t pid)
|
||||||
|
{
|
||||||
|
//logFile << "ID<" << pid << "><3E><><EFBFBD>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>ڵ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>" << std::endl;
|
||||||
|
int i = 0;
|
||||||
|
for (; i < 3; ++i)
|
||||||
|
if (m_PIDList[i] == pid)
|
||||||
|
break;
|
||||||
|
if (i == 3)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
throw "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><EFBFBD>ڵ<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Room::setLandlords(int n)
|
||||||
|
{
|
||||||
|
m_lastPop = m_turn = m_landlord = n;
|
||||||
|
logFile << n << "<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
m_playerCards[m_landlord].insert(m_playerCards[m_landlord].end(),
|
||||||
|
m_cards.end() - 3, m_cards.end());
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
std::sort(m_playerCards[m_landlord].begin(), m_playerCards[m_landlord].end());
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Room::isSubset(const std::vector<card_t>& sub)
|
||||||
|
{
|
||||||
|
auto & vec = m_playerCards[m_turn];
|
||||||
|
if (sub.size() > vec.size())
|
||||||
|
return false;
|
||||||
|
int arr[16] = { 0 };
|
||||||
|
for (auto i : sub)
|
||||||
|
arr[i]++;
|
||||||
|
for (auto i : vec)
|
||||||
|
arr[i]--;
|
||||||
|
for (auto i : arr)
|
||||||
|
if (i > 0)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Room::removeSubset(const std::vector<card_t>& sub)
|
||||||
|
{
|
||||||
|
auto & vec = m_playerCards[m_turn];
|
||||||
|
if (sub.size() > vec.size())
|
||||||
|
return false;
|
||||||
|
int arr[16] = { 0 };
|
||||||
|
for (auto i : sub)
|
||||||
|
arr[i]++;
|
||||||
|
for (auto it = vec.begin(); it != vec.end(); )
|
||||||
|
if (arr[*it]-- > 0)
|
||||||
|
it = vec.erase(it);
|
||||||
|
else
|
||||||
|
++it;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Room::coll(bool isColl)
|
||||||
|
{
|
||||||
|
if (m_first != -1)
|
||||||
|
return true;
|
||||||
|
if (isColl)
|
||||||
|
{
|
||||||
|
logFile << m_turn << " <20>е<EFBFBD><D0B5><EFBFBD>" << std::endl;
|
||||||
|
m_lastPop = m_first = m_turn;
|
||||||
|
for (turnNext(); !m_Grad[m_turn]; turnNext())
|
||||||
|
logFile << m_turn << "û<EFBFBD>ʸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
logFile << m_turn << "<EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD>" << std::endl;
|
||||||
|
if (m_first == m_turn)
|
||||||
|
{
|
||||||
|
setLandlords(m_turn);
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><EFBFBD>õ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
m_Grad[m_turn] = false;
|
||||||
|
logFile << m_turn << "<EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD>" << std::endl;
|
||||||
|
turnNext();
|
||||||
|
if (!m_Grad[m_turn]) // <20><><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>û<EFBFBD>˽е<CBBD><D0B5><EFBFBD>
|
||||||
|
{
|
||||||
|
logFile << "û<EFBFBD>˽е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؿ<EFBFBD>" << std::endl;
|
||||||
|
start();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Room::grab(bool isGrab)
|
||||||
|
{
|
||||||
|
if (m_landlord != -1)
|
||||||
|
return false;
|
||||||
|
if (isGrab)
|
||||||
|
{
|
||||||
|
logFile << m_turn << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
m_lastPop = m_turn;
|
||||||
|
doubleMultiple();
|
||||||
|
for (turnNext(); !m_Grad[m_turn]; turnNext())
|
||||||
|
logFile << m_turn << "û<EFBFBD>ʸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
logFile << m_turn << "<EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD>" << std::endl;
|
||||||
|
if (m_lastPop == m_turn) // <20><><EFBFBD><EFBFBD>תһȦ<D2BB><C8A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
{
|
||||||
|
logFile << m_turn << "<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
setLandlords(m_lastPop);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
m_Grad[m_lastPop] = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int temp = m_turn;
|
||||||
|
logFile << m_turn << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
for (turnNext(); !m_Grad[m_turn]; turnNext())
|
||||||
|
logFile << m_turn << "û<EFBFBD>ʸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
logFile << m_turn << "<EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD>" << std::endl;
|
||||||
|
|
||||||
|
if (temp == m_turn) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD>û<EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>(<28><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>...)
|
||||||
|
{
|
||||||
|
setLandlords(m_lastPop);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ľ<EFBFBD><C4BE>ǽе<C7BD><D0B5><EFBFBD><EFBFBD>ģ<EFBFBD>ͬʱ<CDAC><CAB1>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD>ֱ<EFBFBD>ӳ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
|
||||||
|
if (m_turn == m_first && m_first == m_lastPop)
|
||||||
|
{
|
||||||
|
logFile << m_turn << "<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
setLandlords(m_first);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
m_Grad[temp] = false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Room::popCards(const PlayingCards & cards)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> " << cards.getType() << std::endl;
|
||||||
|
if (cards.getType() == c0)
|
||||||
|
return false;
|
||||||
|
if (!isSubset(cards.getVec()))
|
||||||
|
{
|
||||||
|
logFile << "û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// <20><>ը <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӶԹ<D3B6><D4B9><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
if (cards.getType() == c11)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD>ը" << std::endl;
|
||||||
|
doubleMultiple();
|
||||||
|
}
|
||||||
|
// <20><><EFBFBD>ƽ<C6BD> ֻҪ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Գ<EFBFBD><D4B3><EFBFBD>
|
||||||
|
else if (isPopCards())
|
||||||
|
{
|
||||||
|
if (cards.getType() == c4) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ը<EFBFBD><D5A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ը<EFBFBD><D5A8> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
{
|
||||||
|
logFile << "ը<EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
doubleMultiple();
|
||||||
|
}
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD>Գ<EFBFBD>
|
||||||
|
}
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<C6BD>
|
||||||
|
else if (cards.getType() == c4) // ը<><D5A8>
|
||||||
|
{
|
||||||
|
if (!(m_lastRoundCards < cards))// û<>ϼҴ<CFBC>
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// <20>ų<EFBFBD><C5B3><EFBFBD>ը<EFBFBD><D5A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ը<EFBFBD><D5A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD>ֱͬ<CDAC>ӷ<EFBFBD><D3B7>ؼ<EFBFBD>
|
||||||
|
else if (cards.getType() != m_lastRoundCards.getType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// <20>ų<EFBFBD><C5B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD>
|
||||||
|
else if (cards.getSize() != m_lastRoundCards.getSize())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3B2BBB9>ϼң<CFBC>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD>
|
||||||
|
else if (!(m_lastRoundCards < cards))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƿ϶<C6BF><CFB6>ǵó<C7B5><C3B3><EFBFBD>ȥ<EFBFBD><C8A5>
|
||||||
|
m_lastPop = m_turn;
|
||||||
|
m_lastRoundCards = cards;
|
||||||
|
removeSubset(cards.getVec());
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD>Ƴɹ<EFBFBD>" << std::endl;
|
||||||
|
|
||||||
|
if (m_playerCards[m_turn].empty())
|
||||||
|
{
|
||||||
|
endGame();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cards.getType() != c11) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ը<EFBFBD><D5A8>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>¼<EFBFBD><C2BC><EFBFBD>
|
||||||
|
turnNext();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Room::pass()
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
// <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>ƽ<C6BD> <20><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
if (m_turn == m_lastPop) // <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>Ƶľ<C6B5><C4BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
turnNext();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Room::Refresh()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 54; ++i)
|
||||||
|
std::swap(m_cards[i], m_cards[cardsU(e)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Room::distribution()
|
||||||
|
{
|
||||||
|
for (size_t i = 0; i < m_playerCards.size(); ++i)
|
||||||
|
{
|
||||||
|
m_playerCards[i].clear();
|
||||||
|
m_playerCards[i].insert(m_playerCards[i].begin(),
|
||||||
|
m_cards.begin() + (i * 17), m_cards.begin() + ((i + 1) * 17));
|
||||||
|
std::sort(m_playerCards[i].begin(), m_playerCards[i].end());
|
||||||
|
logFile << i << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵõ<EFBFBD><EFBFBD>ˣ<EFBFBD>";
|
||||||
|
for (auto n : m_playerCards[i])
|
||||||
|
logFile << n << ' ';
|
||||||
|
logFile << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Room::endGame()
|
||||||
|
{
|
||||||
|
m_roomStatus = roomStatus_t::Waiting;
|
||||||
|
|
||||||
|
for (auto pid : m_PIDList)
|
||||||
|
{
|
||||||
|
server().playerReady(pid);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
115
Landlords/Room.h
Normal file
115
Landlords/Room.h
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "define.h"
|
||||||
|
#include "Server.h"
|
||||||
|
#include "PlayingCards.h"
|
||||||
|
#include <vector>
|
||||||
|
#include <array>
|
||||||
|
|
||||||
|
enum roomStatus_t :char {
|
||||||
|
Waiting,
|
||||||
|
playing
|
||||||
|
};
|
||||||
|
|
||||||
|
const int roomPlayerLimit = 3;
|
||||||
|
|
||||||
|
class Room
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Room() = delete;
|
||||||
|
Room(roomID_t rid, playerID_t pid);
|
||||||
|
~Room();
|
||||||
|
|
||||||
|
roomID_t getID() const { return m_id; };
|
||||||
|
roomStatus_t getStatus() const { return m_roomStatus; }
|
||||||
|
const std::vector<playerID_t>& getPlayerIDList() const { return m_PIDList; }
|
||||||
|
size_t getSize() const { return m_PIDList.size(); }
|
||||||
|
// void setStatus(roomStatus_t status) { roomStatus = status; }
|
||||||
|
bool full() const { return m_PIDList.size() >= roomPlayerLimit; }
|
||||||
|
public:
|
||||||
|
bool playerJoin(playerID_t pid);
|
||||||
|
bool playerLeave(playerID_t pid);
|
||||||
|
|
||||||
|
public:
|
||||||
|
// <20><>ʼ <20><><EFBFBD><EFBFBD>playing״̬
|
||||||
|
void start();
|
||||||
|
/********** <20><><EFBFBD>²<EFBFBD><C2B2><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD>playing״̬<D7B4><CCAC><EFBFBD>ſ<EFBFBD>ʹ<EFBFBD><CAB9> ************/
|
||||||
|
|
||||||
|
// <20>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
std::array<card_t, 3> getLandCards();
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0
|
||||||
|
playerID_t getLandID() { return m_landlord==-1?0:m_PIDList[m_landlord]; }
|
||||||
|
|
||||||
|
// <20>õ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
const std::vector<card_t> &getPlayerCards(playerID_t pid);
|
||||||
|
|
||||||
|
// <20>õ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
size_t getPlayerCardsSize(playerID_t pid);
|
||||||
|
|
||||||
|
// <20>õ<EFBFBD><C3B5><EFBFBD>ǰ<EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD>ID
|
||||||
|
playerID_t getThisTurn() { logFile << "<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD>" << m_turn << std::endl; return m_PIDList.at(m_turn); }
|
||||||
|
|
||||||
|
// <20>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD><C3BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼٱ<D8BC>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>ؿ<EFBFBD>
|
||||||
|
bool coll(bool isColl);
|
||||||
|
// <20>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
bool isColledLand() { return m_first != -1; }
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>棬<EFBFBD><E6A3AC><EFBFBD>ؼ<F2B7B5BB>
|
||||||
|
bool grab(bool isGrab);
|
||||||
|
|
||||||
|
// <20><><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dz<EFBFBD><C7B3><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD>Ƴɹ<C6B3><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2>Ϸ<EFBFBD><CFB7><EFBFBD><EFBFBD>ߴ<DFB4><F3B2BBB9>ϼ<EFBFBD> <20><><EFBFBD>ؼ<EFBFBD>
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ը<EFBFBD><D5A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD>Ǹ<EFBFBD><C7B8><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3><EFBFBD>
|
||||||
|
// <20><><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
bool popCards(const PlayingCards & cards);
|
||||||
|
|
||||||
|
// ע<>⣺<EFBFBD><E2A3BA><EFBFBD>ƽ<C6BD><D7B6><EFBFBD>pass<73><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD><C3B4><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD>
|
||||||
|
bool pass();
|
||||||
|
|
||||||
|
// <20>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
const std::vector<card_t> & getLastRoundCards() { return m_lastRoundCards.getVec(); }
|
||||||
|
|
||||||
|
// <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ƽΣ<D7B6><CEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽΣ<D7B6>
|
||||||
|
bool isPopCards() { return m_turn == m_lastPop; }
|
||||||
|
|
||||||
|
// <20>Ƿ<EFBFBD><C7B7><EFBFBD>Ϸ<EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
bool isEndGame() { return m_roomStatus == roomStatus_t::Waiting; }
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ص÷<D8B5>
|
||||||
|
int settle(playerID_t pid);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
bool operator==(roomID_t rid) { return m_id == rid; }
|
||||||
|
private:
|
||||||
|
int findPlayer(playerID_t pid);
|
||||||
|
void doubleMultiple() { m_multiple *= 2; }
|
||||||
|
void turnNext() { ++m_turn %= m_PIDList.size(); }
|
||||||
|
void setLandlords(int n);
|
||||||
|
bool isSubset(const std::vector<card_t> &sub);
|
||||||
|
bool removeSubset(const std::vector<card_t> &sub);
|
||||||
|
|
||||||
|
void Refresh();
|
||||||
|
void distribution();
|
||||||
|
|
||||||
|
|
||||||
|
// <20><>Ϸ<EFBFBD><CFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
void endGame();
|
||||||
|
|
||||||
|
private:
|
||||||
|
roomID_t m_id;
|
||||||
|
roomStatus_t m_roomStatus;
|
||||||
|
std::vector<playerID_t> m_PIDList;
|
||||||
|
std::array<card_t, 54> m_cards;
|
||||||
|
std::array<std::vector<card_t>, roomPlayerLimit> m_playerCards;
|
||||||
|
PlayingCards m_lastRoundCards; // <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>
|
||||||
|
/*********************************************************/
|
||||||
|
int m_first; // <20><>һ<EFBFBD><D2BB><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
bool m_Grad[roomPlayerLimit]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD>
|
||||||
|
/*********************************************************/
|
||||||
|
int m_lastPop; // <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
int m_turn; // <20><>ǰ<EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
int m_landlord; // <20><><EFBFBD><EFBFBD>
|
||||||
|
int m_X; // <20><><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5> <20>÷ֹ<C3B7>ʽ X * m (<28><><EFBFBD><EFBFBD>*2)
|
||||||
|
uint32_t m_multiple; // <20><><EFBFBD><EFBFBD>
|
||||||
|
};
|
||||||
|
|
284
Landlords/Server.cpp
Normal file
284
Landlords/Server.cpp
Normal file
@@ -0,0 +1,284 @@
|
|||||||
|
#include "stdafx.h"
|
||||||
|
#include "Server.h"
|
||||||
|
#include <ctime>
|
||||||
|
|
||||||
|
std::default_random_engine e;
|
||||||
|
std::uniform_int_distribution<int> landU(0, 2); // ѡ<><D1A1><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
std::uniform_int_distribution<int> cardsU(0, 53); // ϴ<><CFB4>
|
||||||
|
|
||||||
|
|
||||||
|
Server::Server()
|
||||||
|
{
|
||||||
|
logFile << "Server::Server()" << std::endl;
|
||||||
|
std::ifstream fin("data.dat");
|
||||||
|
if (!fin.is_open())
|
||||||
|
{
|
||||||
|
logFile << "data.dat <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
std::string str;
|
||||||
|
playerID_t pid;
|
||||||
|
std::string name;
|
||||||
|
int integral = 0;
|
||||||
|
while (fin.good() && std::getline(fin, str))
|
||||||
|
{
|
||||||
|
std::istringstream sin(str);
|
||||||
|
sin >> pid >> name >> integral;
|
||||||
|
m_playerList.emplace_back(pid);
|
||||||
|
m_playerList.back().setName(name);
|
||||||
|
m_playerList.back().setIntegral(integral);
|
||||||
|
}
|
||||||
|
fin.close();
|
||||||
|
|
||||||
|
std::random_device rd;
|
||||||
|
e.seed(rd());
|
||||||
|
srand((unsigned int)time(NULL));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Server::~Server()
|
||||||
|
{
|
||||||
|
if (m_playerList.empty())
|
||||||
|
return;
|
||||||
|
std::ofstream fout("data.dat");
|
||||||
|
if (!fout.is_open())
|
||||||
|
{
|
||||||
|
logFile << "data.dat <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (auto i : m_playerList)
|
||||||
|
{
|
||||||
|
fout << i.getID() << '\t' << i.getName() << '\t' << i.getIntegral() << std::endl;
|
||||||
|
}
|
||||||
|
fout.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
Room * Server::getRoom(roomID_t rid)
|
||||||
|
{
|
||||||
|
if (m_roomList.empty())
|
||||||
|
return nullptr;
|
||||||
|
/*
|
||||||
|
auto it = m_roomList.begin();
|
||||||
|
for (; it != m_roomList.end(); ++it)
|
||||||
|
if (it->getID() == rid)
|
||||||
|
break;
|
||||||
|
if (it == m_roomList.end())
|
||||||
|
return nullptr;
|
||||||
|
else
|
||||||
|
return &(*it);
|
||||||
|
*/
|
||||||
|
// <20><><EFBFBD>ڸ÷<DAB8><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD>ҷ<EFBFBD><D2B7><EFBFBD><EFBFBD>б<EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㷨<EFBFBD><E3B7A8><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>
|
||||||
|
int left = 0;
|
||||||
|
int right = m_roomList.size() - 1;
|
||||||
|
while (left <= right)
|
||||||
|
{
|
||||||
|
int mid = left + ((right - left) >> 1);
|
||||||
|
if (m_roomList[mid].getID() == rid)
|
||||||
|
return &m_roomList[mid];
|
||||||
|
else if (m_roomList[mid].getID() > rid)
|
||||||
|
right = mid - 1;
|
||||||
|
else
|
||||||
|
left = mid + 1;
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player * Server::getPlayer(playerID_t pid)
|
||||||
|
{
|
||||||
|
if (m_playerList.empty())
|
||||||
|
return nullptr;
|
||||||
|
/*
|
||||||
|
auto it = m_playerList.begin();
|
||||||
|
for (; it != m_playerList.end(); ++it)
|
||||||
|
if (it->getID() == pid)
|
||||||
|
break;
|
||||||
|
if (it == m_playerList.end())
|
||||||
|
return nullptr;
|
||||||
|
else
|
||||||
|
return &(*it);
|
||||||
|
*/
|
||||||
|
// <20><><EFBFBD>ڸ÷<DAB8><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD>ҷ<EFBFBD><D2B7><EFBFBD><EFBFBD>б<EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㷨<EFBFBD><E3B7A8><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>
|
||||||
|
int left = 0;
|
||||||
|
int right = m_playerList.size() - 1;
|
||||||
|
while (left <= right)
|
||||||
|
{
|
||||||
|
int mid = left + ((right - left) >> 1);
|
||||||
|
if (m_playerList[mid].getID() == pid)
|
||||||
|
return &m_playerList[mid];
|
||||||
|
else if (m_playerList[mid].getID() > pid)
|
||||||
|
right = mid - 1;
|
||||||
|
else
|
||||||
|
left = mid + 1;
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
roomID_t Server::createRoom(playerID_t pid)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id:" << pid << " <20><>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
Player *pplayer = getPlayer(pid);
|
||||||
|
if (pplayer->getCurrRoom() != 0)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
roomID_t rid = 0;
|
||||||
|
if (m_roomList.empty())
|
||||||
|
rid = 1;
|
||||||
|
else
|
||||||
|
rid = m_roomList.back().getID() + 1;
|
||||||
|
m_roomList.push_back(Room(rid, pid));
|
||||||
|
pplayer->setCurrRoom(rid);
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id:" << pid << " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>id:" << rid << std::endl;
|
||||||
|
return rid;
|
||||||
|
}
|
||||||
|
|
||||||
|
playerID_t Server::loginPlayer(Player player)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id:" << player.getID() << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
Player * pplayer = getPlayer(player.getID());
|
||||||
|
if (pplayer != nullptr)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD>и<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD>ע<EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
m_playerList.push_back(player);
|
||||||
|
std::sort(m_playerList.begin(), m_playerList.end());
|
||||||
|
return player.getID();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Server::joinRoom(playerID_t pid, roomID_t rid)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id:" << pid << " <20><><EFBFBD>Լ<EFBFBD><D4BC>뷿<EFBFBD>䣬<EFBFBD><E4A3AC><EFBFBD><EFBFBD>id:" << rid << std::endl;
|
||||||
|
if (rid == 0)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID<EFBFBD>Ƿ<EFBFBD>" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Player *pplayer = getPlayer(pid);
|
||||||
|
if (pplayer == nullptr)
|
||||||
|
{
|
||||||
|
logFile << "û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (pplayer->getCurrRoom() == rid)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>귿<EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Room * proom = getRoom(rid);
|
||||||
|
if (proom == nullptr)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><DAB7>䣬<EFBFBD><E4A3AC><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>
|
||||||
|
if (pplayer->getCurrRoom() != 0)
|
||||||
|
leaveRoom(pid);
|
||||||
|
if (proom->playerJoin(pid))
|
||||||
|
{
|
||||||
|
pplayer->setCurrRoom(rid);
|
||||||
|
pplayer->isReady = false;
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id:" << pid << "<EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>뷿<EFBFBD><EFBFBD>:" << rid << std::endl;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Server::leaveRoom(playerID_t pid)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id:" << pid << " <20><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
Player * pplayer = getPlayer(pid);
|
||||||
|
if (pplayer == nullptr)
|
||||||
|
{
|
||||||
|
logFile << "û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
roomID_t rid = pplayer->getCurrRoom();
|
||||||
|
if (rid == 0)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>м<EFBFBD><EFBFBD><EFBFBD><EFBFBD>κη<EFBFBD><EFBFBD>䣬<EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
auto it = std::find(m_roomList.begin(), m_roomList.end(), rid);
|
||||||
|
if (it->playerLeave(pid))
|
||||||
|
{
|
||||||
|
pplayer->setCurrRoom(0);
|
||||||
|
pplayer->isReady = false;
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id:" << pid << " <20>Ѿ<EFBFBD><D1BE>˳<EFBFBD><CBB3><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>䣬<EFBFBD><E4A3AC><EFBFBD><EFBFBD>ID:" << rid << std::endl;
|
||||||
|
if (it->getPlayerIDList().empty())
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD> id:" << rid << std::endl;
|
||||||
|
m_roomList.erase(it);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Server::playerReady(playerID_t pid)
|
||||||
|
{
|
||||||
|
Player *pplayer = getPlayer(pid);
|
||||||
|
roomID_t rid = pplayer->getCurrRoom();
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id:" << pid << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/ȡ<><C8A1><EFBFBD><D7BC>" << std::endl;
|
||||||
|
if (pplayer == nullptr || rid == 0)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>߷<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
pplayer->isReady = !pplayer->isReady;
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD>óɹ<EFBFBD><EFBFBD><EFBFBD>pplayer->isReady:" << pplayer->isReady << std::endl;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Server::startGame(roomID_t rid)
|
||||||
|
{
|
||||||
|
Room *proom = getRoom(rid);
|
||||||
|
if (isRoomAllReady(proom))
|
||||||
|
{
|
||||||
|
proom->start();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Server::isRoomAllReady(Room* proom)
|
||||||
|
{
|
||||||
|
if (proom == nullptr || !proom->full())
|
||||||
|
return false;
|
||||||
|
bool flag = true;
|
||||||
|
for (auto i : proom->getPlayerIDList())
|
||||||
|
{
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<CEB4><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>flagΪfalse
|
||||||
|
if (!getPlayer(i)->isReady)
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
// <20><><EFBFBD><EFBFBD>ʶλδ<CEBB><CEB4><EFBFBD>üٱ<C3BC>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD><CBB6>Ѿ<EFBFBD><EFBFBD><D7BC>
|
||||||
|
if (flag)
|
||||||
|
{
|
||||||
|
logFile << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id:" << proom->getID() << " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><EFBFBD><D7BC>" << std::endl;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Server & server()
|
||||||
|
{
|
||||||
|
static Server s;
|
||||||
|
return s;
|
||||||
|
}
|
40
Landlords/Server.h
Normal file
40
Landlords/Server.h
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <string>
|
||||||
|
#include <fstream>
|
||||||
|
#include <sstream>
|
||||||
|
#include <vector>
|
||||||
|
#include <algorithm>
|
||||||
|
#include "Player.h"
|
||||||
|
#include "Room.h"
|
||||||
|
class Room;
|
||||||
|
class Server
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Server();
|
||||||
|
~Server();
|
||||||
|
|
||||||
|
Room * getRoom(roomID_t rid);
|
||||||
|
Player * getPlayer(playerID_t pid);
|
||||||
|
|
||||||
|
roomID_t createRoom(playerID_t pid);
|
||||||
|
playerID_t loginPlayer(Player player);
|
||||||
|
bool joinRoom(playerID_t pid, roomID_t rid);
|
||||||
|
bool leaveRoom(playerID_t pid);
|
||||||
|
|
||||||
|
const std::vector<Room> & getRoomList() { return m_roomList; }
|
||||||
|
const std::vector<Player> & getPlayerList() { return m_playerList; }
|
||||||
|
|
||||||
|
// <20><>δ<EFBFBD>ڷ<EFBFBD><DAB7>䣬<EFBFBD><E4A3AC><EFBFBD>ؼ١<D8BC><D9A1><EFBFBD><EFBFBD>Ѿ<EFBFBD><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<CEB4><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BC>
|
||||||
|
bool playerReady(playerID_t pid);
|
||||||
|
|
||||||
|
bool startGame(roomID_t rid);
|
||||||
|
private:
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD><EFBFBD><D7BC>
|
||||||
|
bool isRoomAllReady(Room* proom);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::vector<Player> m_playerList;
|
||||||
|
std::vector<Room> m_roomList;
|
||||||
|
};
|
||||||
|
|
||||||
|
Server &server(); // <20><><EFBFBD><EFBFBD>
|
196
Landlords/appmain.cpp
Normal file
196
Landlords/appmain.cpp
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
/*
|
||||||
|
* CoolQ Demo for VC++
|
||||||
|
* Api Version 9
|
||||||
|
* Written by Coxxs & Thanks for the help of orzFly
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "string"
|
||||||
|
#include "cqp.h"
|
||||||
|
#include "appmain.h" //Ӧ<><D3A6>AppID<49><44><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Q<EFBFBD><51><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int ac = -1; //AuthCode <20><><EFBFBD>ÿ<EFBFBD>Q<EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>ʱ<EFBFBD><CAB1>Ҫ<EFBFBD>õ<EFBFBD>
|
||||||
|
bool enabled = false;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><><EFBFBD><EFBFBD>Ӧ<EFBFBD>õ<EFBFBD>ApiVer<65><72>Appid<69><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3BDABB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQEVENT(const char*, AppInfo, 0)() {
|
||||||
|
return CQAPPINFO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>AuthCode<64><65><EFBFBD><EFBFBD>Q<EFBFBD><51>ȡӦ<C8A1><D3A6><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD>Ӧ<EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>AuthCode<64><65>
|
||||||
|
* <20><>Ҫ<EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>κδ<CEBA><CEB4>룬<EFBFBD><EBA3AC><EFBFBD>ⷢ<EFBFBD><E2B7A2><EFBFBD>쳣<EFBFBD><ECB3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>г<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Startup<75>¼<EFBFBD><C2BC><EFBFBD>ִ<EFBFBD>У<EFBFBD>Type=1001<30><31><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, Initialize, 4)(int32_t AuthCode) {
|
||||||
|
ac = AuthCode;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=1001 <20><>Q<EFBFBD><51><EFBFBD><EFBFBD>
|
||||||
|
* <20><><EFBFBD>۱<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD>Q<EFBFBD><51><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>һ<EFBFBD>Σ<EFBFBD><CEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>Ӧ<EFBFBD>ó<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>롣
|
||||||
|
* <20><><EFBFBD>DZ<EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><D8B4>ڡ<EFBFBD><DAA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӳ˵<D3B2><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ֶ<EFBFBD><D6B6><EFBFBD><F2BFAAB4>ڣ<EFBFBD>
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventStartup, 0)() {
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=1002 <20><>Q<EFBFBD>˳<EFBFBD>
|
||||||
|
* <20><><EFBFBD>۱<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD>Q<EFBFBD>˳<EFBFBD>ǰִ<C7B0><D6B4>һ<EFBFBD>Σ<EFBFBD><CEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>в<EFBFBD><D0B2><EFBFBD><EFBFBD>رմ<D8B1><D5B4>롣
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϻ<CFBA>Q<EFBFBD><51><EFBFBD>ܿ<EFBFBD><DCBF>رգ<D8B1><D5A3>벻Ҫ<EBB2BB><D2AA>ͨ<EFBFBD><CDA8><EFBFBD>̵߳ȷ<CCB5>ʽִ<CABD><D6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>롣
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventExit, 0)() {
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=1003 Ӧ<><D3A6><EFBFBD>ѱ<EFBFBD><D1B1><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
* <20><>Ӧ<EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD>ú<C3BA><F3A3ACBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Q<EFBFBD><51><EFBFBD><EFBFBD>ʱӦ<CAB1><D3A6><EFBFBD>ѱ<EFBFBD><D1B1><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD>_eventStartup(Type=1001,<2C><>Q<EFBFBD><51><EFBFBD><EFBFBD>)<29><><EFBFBD><EFBFBD><EFBFBD>ú<C3BA><F3A3ACB1><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>Ρ<EFBFBD>
|
||||||
|
* <20><><EFBFBD>DZ<EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><D8B4>ڡ<EFBFBD><DAA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӳ˵<D3B2><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ֶ<EFBFBD><D6B6><EFBFBD><F2BFAAB4>ڣ<EFBFBD>
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventEnable, 0)() {
|
||||||
|
enabled = true;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=1004 Ӧ<>ý<EFBFBD><C3BD><EFBFBD>ͣ<EFBFBD><CDA3>
|
||||||
|
* <20><>Ӧ<EFBFBD>ñ<EFBFBD>ͣ<EFBFBD><CDA3>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Q<EFBFBD><51><EFBFBD><EFBFBD>ʱӦ<CAB1><D3A6><EFBFBD>ѱ<EFBFBD>ͣ<EFBFBD>ã<EFBFBD><C3A3><EFBFBD><F2B1BEBA><EFBFBD>*<2A><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>
|
||||||
|
* <20><><EFBFBD>۱<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>Q<EFBFBD>ر<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventDisable, 0)() {
|
||||||
|
enabled = false;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=21 ˽<><CBBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
* subType <20><><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>11/<2F><><EFBFBD>Ժ<EFBFBD><D4BA><EFBFBD> 1/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬ 2/<2F><><EFBFBD><EFBFBD>Ⱥ 3/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventPrivateMsg, 24)(int32_t subType, int32_t msgId, int64_t fromQQ, const char *msg, int32_t font) {
|
||||||
|
|
||||||
|
//<2F><><EFBFBD><EFBFBD>Ҫ<EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>Q<EFBFBD><51><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD><CDA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> return EVENT_BLOCK - <20>ضϱ<D8B6><CFB1><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ټ<EFBFBD><D9BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ע<>⣺Ӧ<E2A3BA><D3A6><EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD>Ϊ"<22><><EFBFBD><EFBFBD>"(10000)ʱ<><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD>ֵ
|
||||||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> return EVENT_IGNORE - <20><><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
return EVENT_IGNORE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=2 Ⱥ<><C8BA>Ϣ
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventGroupMsg, 36)(int32_t subType, int32_t msgId, int64_t fromGroup, int64_t fromQQ, const char *fromAnonymous, const char *msg, int32_t font) {
|
||||||
|
|
||||||
|
return EVENT_IGNORE; //<2F><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>ֵ˵<D6B5><CBB5>, <20><><EFBFBD><EFBFBD>_eventPrivateMsg<73><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventDiscussMsg, 32)(int32_t subType, int32_t msgId, int64_t fromDiscuss, int64_t fromQQ, const char *msg, int32_t font) {
|
||||||
|
|
||||||
|
return EVENT_IGNORE; //<2F><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>ֵ˵<D6B5><CBB5>, <20><><EFBFBD><EFBFBD>_eventPrivateMsg<73><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=101 Ⱥ<>¼<EFBFBD>-<2D><><EFBFBD><EFBFBD>Ա<EFBFBD>䶯
|
||||||
|
* subType <20><><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>1/<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա 2/<2F><><EFBFBD><EFBFBD><EFBFBD>ù<EFBFBD><C3B9><EFBFBD>Ա
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventSystem_GroupAdmin, 24)(int32_t subType, int32_t sendTime, int64_t fromGroup, int64_t beingOperateQQ) {
|
||||||
|
|
||||||
|
return EVENT_IGNORE; //<2F><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>ֵ˵<D6B5><CBB5>, <20><><EFBFBD><EFBFBD>_eventPrivateMsg<73><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=102 Ⱥ<>¼<EFBFBD>-Ⱥ<><C8BA>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>
|
||||||
|
* subType <20><><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>1/ȺԱ<C8BA>뿪 2/ȺԱ<C8BA><D4B1><EFBFBD><EFBFBD> 3/<2F>Լ<EFBFBD>(<28><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>)<29><><EFBFBD><EFBFBD>
|
||||||
|
* fromQQ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ(<28><>subTypeΪ2<CEAA><32>3ʱ<33><CAB1><EFBFBD><EFBFBD>)
|
||||||
|
* beingOperateQQ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventSystem_GroupMemberDecrease, 32)(int32_t subType, int32_t sendTime, int64_t fromGroup, int64_t fromQQ, int64_t beingOperateQQ) {
|
||||||
|
|
||||||
|
return EVENT_IGNORE; //<2F><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>ֵ˵<D6B5><CBB5>, <20><><EFBFBD><EFBFBD>_eventPrivateMsg<73><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=103 Ⱥ<>¼<EFBFBD>-Ⱥ<><C8BA>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>
|
||||||
|
* subType <20><><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>1/<2F><><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ͬ<EFBFBD><CDAC> 2/<2F><><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>
|
||||||
|
* fromQQ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԱQQ)
|
||||||
|
* beingOperateQQ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ(<28><><EFBFBD><EFBFBD>Ⱥ<EFBFBD><C8BA>QQ)
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventSystem_GroupMemberIncrease, 32)(int32_t subType, int32_t sendTime, int64_t fromGroup, int64_t fromQQ, int64_t beingOperateQQ) {
|
||||||
|
|
||||||
|
return EVENT_IGNORE; //<2F><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>ֵ˵<D6B5><CBB5>, <20><><EFBFBD><EFBFBD>_eventPrivateMsg<73><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=201 <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventFriend_Add, 16)(int32_t subType, int32_t sendTime, int64_t fromQQ) {
|
||||||
|
|
||||||
|
return EVENT_IGNORE; //<2F><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>ֵ˵<D6B5><CBB5>, <20><><EFBFBD><EFBFBD>_eventPrivateMsg<73><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=301 <20><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
* msg <20><><EFBFBD><EFBFBD>
|
||||||
|
* responseFlag <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventRequest_AddFriend, 24)(int32_t subType, int32_t sendTime, int64_t fromQQ, const char *msg, const char *responseFlag) {
|
||||||
|
|
||||||
|
//CQ_setFriendAddRequest(ac, responseFlag, REQUEST_ALLOW, "");
|
||||||
|
|
||||||
|
return EVENT_IGNORE; //<2F><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>ֵ˵<D6B5><CBB5>, <20><><EFBFBD><EFBFBD>_eventPrivateMsg<73><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type=302 <20><><EFBFBD><EFBFBD>-Ⱥ<><C8BA><EFBFBD><EFBFBD>
|
||||||
|
* subType <20><><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>1/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ 2/<2F>Լ<EFBFBD>(<28><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ
|
||||||
|
* msg <20><><EFBFBD><EFBFBD>
|
||||||
|
* responseFlag <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __eventRequest_AddGroup, 32)(int32_t subType, int32_t sendTime, int64_t fromGroup, int64_t fromQQ, const char *msg, const char *responseFlag) {
|
||||||
|
|
||||||
|
//if (subType == 1) {
|
||||||
|
// CQ_setGroupAddRequestV2(ac, responseFlag, REQUEST_GROUPADD, REQUEST_ALLOW, "");
|
||||||
|
//} else if (subType == 2) {
|
||||||
|
// CQ_setGroupAddRequestV2(ac, responseFlag, REQUEST_GROUPINVITE, REQUEST_ALLOW, "");
|
||||||
|
//}
|
||||||
|
|
||||||
|
return EVENT_IGNORE; //<2F><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>ֵ˵<D6B5><CBB5>, <20><><EFBFBD><EFBFBD>_eventPrivateMsg<73><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> .json <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ò˵<C3B2><CBB5><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>ò˵<C3B2><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> .json <20><><EFBFBD>˴<EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>ò˵<C3B2>
|
||||||
|
*/
|
||||||
|
CQEVENT(int32_t, __menuA, 0)() {
|
||||||
|
MessageBoxA(NULL, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>menuA<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>봰<EFBFBD>ڣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "" ,0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
CQEVENT(int32_t, __menuB, 0)() {
|
||||||
|
MessageBoxA(NULL, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>menuB<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>봰<EFBFBD>ڣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "" ,0);
|
||||||
|
return 0;
|
||||||
|
}
|
2
Landlords/appmain.h
Normal file
2
Landlords/appmain.h
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#define CQAPPID "com.example.democ" //<2F><><EFBFBD><EFBFBD>AppID<49><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> http://d.cqp.me/Pro/<2F><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
#define CQAPPINFO CQAPIVERTEXT "," CQAPPID
|
226
Landlords/cqp.h
Normal file
226
Landlords/cqp.h
Normal file
@@ -0,0 +1,226 @@
|
|||||||
|
/*
|
||||||
|
* CoolQ SDK for VC++
|
||||||
|
* Api Version 9
|
||||||
|
* Written by Coxxs & Thanks for the help of orzFly
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
#define CQAPIVER 9
|
||||||
|
#define CQAPIVERTEXT "9"
|
||||||
|
|
||||||
|
#ifndef CQAPI
|
||||||
|
#define CQAPI(ReturnType) extern "C" __declspec(dllimport) ReturnType __stdcall
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define CQEVENT(ReturnType, Name, Size) __pragma(comment(linker, "/EXPORT:" #Name "=_" #Name "@" #Size))\
|
||||||
|
extern "C" __declspec(dllexport) ReturnType __stdcall Name
|
||||||
|
|
||||||
|
typedef int32_t CQBOOL;
|
||||||
|
|
||||||
|
|
||||||
|
#define EVENT_IGNORE 0 //<2F>¼<EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD>
|
||||||
|
#define EVENT_BLOCK 1 //<2F>¼<EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
#define REQUEST_ALLOW 1 //<2F><><EFBFBD><EFBFBD>_ͨ<5F><CDA8>
|
||||||
|
#define REQUEST_DENY 2 //<2F><><EFBFBD><EFBFBD>_<EFBFBD>ܾ<EFBFBD>
|
||||||
|
|
||||||
|
#define REQUEST_GROUPADD 1 //<2F><><EFBFBD><EFBFBD>_Ⱥ<5F><C8BA><EFBFBD><EFBFBD>
|
||||||
|
#define REQUEST_GROUPINVITE 2 //<2F><><EFBFBD><EFBFBD>_Ⱥ<5F><C8BA><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
#define CQLOG_DEBUG 0 //<2F><><EFBFBD><EFBFBD> <20><>ɫ
|
||||||
|
#define CQLOG_INFO 10 //<2F><>Ϣ <20><>ɫ
|
||||||
|
#define CQLOG_INFOSUCCESS 11 //<2F><>Ϣ(<28>ɹ<EFBFBD>) <20><>ɫ
|
||||||
|
#define CQLOG_INFORECV 12 //<2F><>Ϣ(<28><><EFBFBD><EFBFBD>) <20><>ɫ
|
||||||
|
#define CQLOG_INFOSEND 13 //<2F><>Ϣ(<28><><EFBFBD><EFBFBD>) <20><>ɫ
|
||||||
|
#define CQLOG_WARNING 20 //<2F><><EFBFBD><EFBFBD> <20><>ɫ
|
||||||
|
#define CQLOG_ERROR 30 //<2F><><EFBFBD><EFBFBD> <20><>ɫ
|
||||||
|
#define CQLOG_FATAL 40 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><><EFBFBD><EFBFBD>˽<EFBFBD><CBBD><EFBFBD><EFBFBD>Ϣ, <20>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢID
|
||||||
|
* QQID Ŀ<><C4BF>QQ<51><51>
|
||||||
|
* msg <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_sendPrivateMsg(int32_t AuthCode, int64_t QQID, const char *msg);
|
||||||
|
/*
|
||||||
|
* <20><><EFBFBD><EFBFBD>Ⱥ<EFBFBD><C8BA>Ϣ, <20>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢID
|
||||||
|
* groupid Ⱥ<><C8BA>
|
||||||
|
* msg <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_sendGroupMsg(int32_t AuthCode, int64_t groupid, const char *msg);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ, <20>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢID
|
||||||
|
* discussid <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
* msg <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_sendDiscussMsg(int32_t AuthCode, int64_t discussid, const char *msg);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
* msgid <20><>ϢID
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_deleteMsg(int32_t AuthCode, int64_t msgid);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD>
|
||||||
|
* QQID QQ<51><51>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_sendLike(int32_t AuthCode, int64_t QQID);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><>ȺԱ<C8BA>Ƴ<EFBFBD>
|
||||||
|
* groupid Ŀ<><C4BF>Ⱥ
|
||||||
|
* QQID QQ<51><51>
|
||||||
|
* rejectaddrequest <20><><EFBFBD>ٽ<EFBFBD><D9BD>մ<EFBFBD><D5B4>˼<EFBFBD>Ⱥ<EFBFBD><C8BA><EFBFBD>룬<EFBFBD><EBA3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setGroupKick(int32_t AuthCode, int64_t groupid, int64_t QQID, CQBOOL rejectaddrequest);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><>ȺԱ<C8BA><D4B1><EFBFBD><EFBFBD>
|
||||||
|
* groupid Ŀ<><C4BF>Ⱥ
|
||||||
|
* QQID QQ<51><51>
|
||||||
|
* duration <20><><EFBFBD>Ե<EFBFBD>ʱ<EFBFBD>䣬<EFBFBD><E4A3AC>λΪ<CEBB>롣<EFBFBD><EBA1A3><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д0<D0B4><30>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setGroupBan(int32_t AuthCode, int64_t groupid, int64_t QQID, int64_t duration);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><>Ⱥ<EFBFBD><C8BA><EFBFBD><EFBFBD>Ա
|
||||||
|
* groupid Ŀ<><C4BF>Ⱥ
|
||||||
|
* QQID QQ<51><51>
|
||||||
|
* setadmin true:<3A><><EFBFBD>ù<EFBFBD><C3B9><EFBFBD>Ա false:ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setGroupAdmin(int32_t AuthCode, int64_t groupid, int64_t QQID, CQBOOL setadmin);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><>ȫȺ<C8AB><C8BA><EFBFBD><EFBFBD>
|
||||||
|
* groupid Ŀ<><C4BF>Ⱥ
|
||||||
|
* enableban true:<3A><><EFBFBD><EFBFBD> false:<3A>ر<EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setGroupWholeBan(int32_t AuthCode, int64_t groupid, CQBOOL enableban);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȺԱ<C8BA><D4B1><EFBFBD><EFBFBD>
|
||||||
|
* groupid Ŀ<><C4BF>Ⱥ
|
||||||
|
* anomymous Ⱥ<><C8BA>Ϣ<EFBFBD>¼<EFBFBD><C2BC>յ<EFBFBD><D5B5><EFBFBD> anomymous <20><><EFBFBD><EFBFBD>
|
||||||
|
* duration <20><><EFBFBD>Ե<EFBFBD>ʱ<EFBFBD>䣬<EFBFBD><E4A3AC>λΪ<CEBB>롣<EFBFBD><EBA1A3>֧<EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setGroupAnonymousBan(int32_t AuthCode, int64_t groupid, const char *anomymous, int64_t duration);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><>Ⱥ<EFBFBD><C8BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
* groupid Ŀ<><C4BF>Ⱥ
|
||||||
|
* enableanomymous true:<3A><><EFBFBD><EFBFBD> false:<3A>ر<EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setGroupAnonymous(int32_t AuthCode, int64_t groupid, CQBOOL enableanomymous);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><>Ⱥ<EFBFBD><C8BA>Ա<EFBFBD><D4B1>Ƭ
|
||||||
|
* groupid Ŀ<><C4BF>Ⱥ
|
||||||
|
* QQID Ŀ<><C4BF>QQ
|
||||||
|
* newcard <20><><EFBFBD><EFBFBD>Ƭ(<28>dz<EFBFBD>)
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setGroupCard(int32_t AuthCode, int64_t groupid, int64_t QQID, const char *newcard);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><>Ⱥ<EFBFBD>˳<EFBFBD> <20><><EFBFBD><EFBFBD>, <20>˽ӿ<CBBD><D3BF><EFBFBD>Ҫ<EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD>Ȩ
|
||||||
|
* groupid Ŀ<><C4BF>Ⱥ
|
||||||
|
* isdismiss <20>Ƿ<EFBFBD><C7B7><EFBFBD>ɢ true:<3A><>ɢ<EFBFBD><C9A2>Ⱥ(Ⱥ<><C8BA>) false:<3A>˳<EFBFBD><CBB3><EFBFBD>Ⱥ(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<EFBFBD><C8BA>Ա)
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setGroupLeave(int32_t AuthCode, int64_t groupid, CQBOOL isdismiss);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><>Ⱥ<EFBFBD><C8BA>Աר<D4B1><D7A8>ͷ<EFBFBD><CDB7> <20><>Ⱥ<EFBFBD><C8BA>Ȩ<EFBFBD><C8A8>
|
||||||
|
* groupid Ŀ<><C4BF>Ⱥ
|
||||||
|
* QQID Ŀ<><C4BF>QQ
|
||||||
|
* newspecialtitle ͷ<>Σ<EFBFBD><CEA3><EFBFBD><EFBFBD><EFBFBD>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>գ<EFBFBD>
|
||||||
|
* duration ר<><D7A8>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>Ч<EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD>λΪ<CEBB>롣<EFBFBD><EBA1A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д-1<><31>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setGroupSpecialTitle(int32_t AuthCode, int64_t groupid, int64_t QQID, const char *newspecialtitle, int64_t duration);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>
|
||||||
|
* discussid Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setDiscussLeave(int32_t AuthCode, int64_t discussid);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20>ú<EFBFBD><C3BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
* responseflag <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>յ<EFBFBD><D5B5><EFBFBD> responseflag <20><><EFBFBD><EFBFBD>
|
||||||
|
* responseoperation REQUEST_ALLOW <20><> REQUEST_DENY
|
||||||
|
* remark <20><><EFBFBD>Ӻ<EFBFBD><D3BA>ĺ<EFBFBD><C4BA>ѱ<EFBFBD>ע
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setFriendAddRequest(int32_t AuthCode, const char *responseflag, int32_t responseoperation, const char *remark);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><>Ⱥ<EFBFBD><C8BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
* responseflag <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>յ<EFBFBD><D5B5><EFBFBD> responseflag <20><><EFBFBD><EFBFBD>
|
||||||
|
* requesttype<70><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> REQUEST_GROUPADD <20><> REQUEST_GROUPINVITE
|
||||||
|
* responseoperation REQUEST_ALLOW <20><> REQUEST_DENY
|
||||||
|
* reason <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD> REQUEST_GROUPADD <20><> REQUEST_DENY ʱ<><CAB1><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setGroupAddRequestV2(int32_t AuthCode, const char *responseflag, int32_t requesttype, int32_t responseoperation, const char *reason);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ȡȺ<C8A1><C8BA>Ա<EFBFBD><D4B1>Ϣ
|
||||||
|
* groupid Ŀ<><C4BF>QQ<51><51><EFBFBD><EFBFBD>Ⱥ
|
||||||
|
* QQID Ŀ<><C4BF>QQ<51><51>
|
||||||
|
* nocache <20><>ʹ<EFBFBD>û<EFBFBD><C3BB><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(const char *) CQ_getGroupMemberInfoV2(int32_t AuthCode, int64_t groupid, int64_t QQID, CQBOOL nocache);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ȡİ<C8A1><C4B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
* QQID Ŀ<><C4BF>QQ
|
||||||
|
* nocache <20><>ʹ<EFBFBD>û<EFBFBD><C3BB><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(const char *) CQ_getStrangerInfo(int32_t AuthCode, int64_t QQID, CQBOOL nocache);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><>־
|
||||||
|
* priority <20><><EFBFBD>ȼ<EFBFBD><C8BC><EFBFBD>CQLOG <20><>ͷ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
|
||||||
|
* category <20><><EFBFBD><EFBFBD>
|
||||||
|
* content <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_addLog(int32_t AuthCode, int32_t priority, const char *category, const char *content);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ȡCookies <20><><EFBFBD><EFBFBD>, <20>˽ӿ<CBBD><D3BF><EFBFBD>Ҫ<EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD>Ȩ
|
||||||
|
*/
|
||||||
|
CQAPI(const char *) CQ_getCookies(int32_t AuthCode);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ȡCsrfToken <20><><EFBFBD><EFBFBD>, <20>˽ӿ<CBBD><D3BF><EFBFBD>Ҫ<EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD>Ȩ
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_getCsrfToken(int32_t AuthCode);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ȡ<><C8A1>¼QQ
|
||||||
|
*/
|
||||||
|
CQAPI(int64_t) CQ_getLoginQQ(int32_t AuthCode);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ȡ<><C8A1>¼QQ<51>dz<EFBFBD>
|
||||||
|
*/
|
||||||
|
CQAPI(const char *) CQ_getLoginNick(int32_t AuthCode);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ȡӦ<C8A1><D3A6>Ŀ¼<C4BF><C2BC><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>·<EFBFBD><C2B7>ĩβ<C4A9><CEB2>"\"
|
||||||
|
*/
|
||||||
|
CQAPI(const char *) CQ_getAppDirectory(int32_t AuthCode);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||||
|
* errorinfo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
*/
|
||||||
|
CQAPI(int32_t) CQ_setFatal(int32_t AuthCode, const char *errorinfo);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>(record),<2C><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD> \data\record\ Ŀ¼<C4BF>µ<EFBFBD><C2B5>ļ<EFBFBD><C4BC><EFBFBD>
|
||||||
|
* file <20>յ<EFBFBD><D5B5><EFBFBD>Ϣ<EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>(file)
|
||||||
|
* outformat Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ʽ<EFBFBD><CABD>Ŀǰ֧<C7B0><D6A7> mp3 amr wma m4a spx ogg wav flac
|
||||||
|
*/
|
||||||
|
CQAPI(const char *) CQ_getRecord(int32_t AuthCode, const char *file, const char *outformat);
|
34
Landlords/define.h
Normal file
34
Landlords/define.h
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <fstream>
|
||||||
|
#include <random>
|
||||||
|
|
||||||
|
using playerID_t = uint64_t;
|
||||||
|
using roomID_t = uint32_t;
|
||||||
|
|
||||||
|
extern std::ofstream logFile;
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
extern std::default_random_engine e;
|
||||||
|
// <20>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
extern std::uniform_int_distribution<int> landU; // ѡ<><D1A1><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
extern std::uniform_int_distribution<int> cardsU; // ϴ<><CFB4>
|
||||||
|
|
||||||
|
enum card_t {
|
||||||
|
_3 = 1,
|
||||||
|
_4,
|
||||||
|
_5,
|
||||||
|
_6,
|
||||||
|
_7,
|
||||||
|
_8,
|
||||||
|
_9,
|
||||||
|
_10,
|
||||||
|
_J,
|
||||||
|
_Q,
|
||||||
|
_K,
|
||||||
|
_A,
|
||||||
|
_2,
|
||||||
|
_S,
|
||||||
|
_B
|
||||||
|
};
|
BIN
Landlords/dllmain.cpp
Normal file
BIN
Landlords/dllmain.cpp
Normal file
Binary file not shown.
76
Landlords/me.cqp.jie.landlords.json
Normal file
76
Landlords/me.cqp.jie.landlords.json
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
// <20><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>Ӧ<EFBFBD>õ<EFBFBD> .dll, .json <20><><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>appid<69><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>AppInfo<66><6F><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊappid
|
||||||
|
// <20><> appid=com.example.democ, <20><>dll<6C><6C>json<6F>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD>Ϊ com.example.democ.dll<6C><6C>com.example.democ.json
|
||||||
|
{
|
||||||
|
"ret":1, // <20><><EFBFBD><EFBFBD><EFBFBD>룬<EFBFBD>̶<EFBFBD>Ϊ1
|
||||||
|
"apiver":9, // Api<70>汾<EFBFBD><E6B1BE><EFBFBD><EFBFBD>SDKΪ9
|
||||||
|
"name":"<22><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", // Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
"version":"1.0.0", // Ӧ<>ð汾
|
||||||
|
"version_id":1, // Ӧ<><D3A6>˳<EFBFBD><CBB3><EFBFBD>汾<EFBFBD><E6B1BE>ÿ<EFBFBD>η<EFBFBD><CEB7><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>+1<><31>
|
||||||
|
"author":"Example", // Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
"description":"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -- <20><><EFBFBD>汾",
|
||||||
|
"event":[ // <20>¼<EFBFBD><C2BC>б<EFBFBD><D0B1><EFBFBD>ͬһ<CDAC>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>Ϳ<EFBFBD><CDBF>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD>壨<EFBFBD><E5A3A8><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>
|
||||||
|
{
|
||||||
|
"id":1, // <20>¼<EFBFBD>ID
|
||||||
|
"type":21, // <20>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
"name":"˽<><CBBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>", // <20>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
"function":"_eventPrivateMsg", // <20>¼<EFBFBD><C2BC><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>
|
||||||
|
"priority":30000 // <20>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>ȼ<EFBFBD>(<28>μ<EFBFBD> cq.im/deveventpriority)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":2,
|
||||||
|
"type":2,
|
||||||
|
"name":"Ⱥ<><C8BA>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>",
|
||||||
|
"function":"_eventGroupMsg",
|
||||||
|
"priority":30000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":3,
|
||||||
|
"type":4,
|
||||||
|
"name":"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>",
|
||||||
|
"function":"_eventDiscussMsg",
|
||||||
|
"priority":30000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":1001,
|
||||||
|
"type":1001,
|
||||||
|
"name":"<22><>Q<EFBFBD><51><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>",
|
||||||
|
"priority":30000,
|
||||||
|
"function":"_eventStartup"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":1002,
|
||||||
|
"type":1002,
|
||||||
|
"name":"<22><>Q<EFBFBD>ر<EFBFBD><D8B1>¼<EFBFBD>",
|
||||||
|
"priority":30000,
|
||||||
|
"function":"_eventExit"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":1003,
|
||||||
|
"type":1003,
|
||||||
|
"name":"Ӧ<><D3A6><EFBFBD>ѱ<EFBFBD><D1B1><EFBFBD><EFBFBD><EFBFBD>",
|
||||||
|
"priority":30000,
|
||||||
|
"function":"_eventEnable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":1004,
|
||||||
|
"type":1004,
|
||||||
|
"name":"Ӧ<>ý<EFBFBD><C3BD><EFBFBD>ͣ<EFBFBD><CDA3>",
|
||||||
|
"priority":30000,
|
||||||
|
"function":"_eventDisable"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"menu":[ // <20><><EFBFBD>ò˵<C3B2><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>ò˵<C3B2><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ò˵<C3B2><CBB5><EFBFBD>ȫ<EFBFBD><C8AB>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>
|
||||||
|
{
|
||||||
|
"name":"<22><><EFBFBD><EFBFBD>", //<2F>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
"function":"_menu" //<2F>˵<EFBFBD><CBB5><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"status":[ // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD> com.example.status <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
],
|
||||||
|
"auth":[ // Ӧ<><D3A6>Ȩ<EFBFBD>ޣ<EFBFBD><DEA3><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>
|
||||||
|
101, //<2F><><EFBFBD><EFBFBD>Ⱥ<EFBFBD><C8BA>Ϣ sendGroupMsg
|
||||||
|
103, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ sendDiscussMsg
|
||||||
|
106 //<2F><><EFBFBD><EFBFBD>˽<EFBFBD><CBBD><EFBFBD><EFBFBD>Ϣ sendPrivateMsg
|
||||||
|
]
|
||||||
|
}
|
104
Landlords/recording.txt
Normal file
104
Landlords/recording.txt
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
-------- <20><><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD> --------
|
||||||
|
2018/2/24 <20><>һ<EFBFBD><D2BB>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ճ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>εĹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>ͻȻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>صĿ<EFBFBD>Q<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>ŷ<EFBFBD><EFBFBD>ŵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD><EFBFBD>ܵ<EFBFBD><EFBFBD>˿<EFBFBD>Q<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>°<EFBFBD><EFBFBD>Ŀ<EFBFBD>Q Air<69><72>ͬʱ<CDAC>õ<EFBFBD><C3B5><EFBFBD>һ<EFBFBD><D2BB>SDK<44><4B>
|
||||||
|
Ȼ<EFBFBD><EFBFBD><EFBFBD>ҾͿ<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>SDK֮<EFBFBD>ϱ<EFBFBD>д<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>磬<EFBFBD><EFBFBD>ͻȻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>SDK<EFBFBD><EFBFBD>дһ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʺ<EFBFBD>QQ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˡ<EFBFBD>
|
||||||
|
<EFBFBD>Ҿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>룬<EFBFBD>ܲ<EFBFBD><EFBFBD><EFBFBD>дһ<EFBFBD><EFBFBD><EFBFBD>Ƚ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DZ<EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>ġ<EFBFBD>
|
||||||
|
ͻȻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뵽<EFBFBD><EFBFBD>Ҫдһ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD>ҷ<EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>£<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD>ɡ<EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD><EFBFBD>Ҿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ
|
||||||
|
|
||||||
|
<EFBFBD>¶<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҿ<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3A3ACB2><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>뿪<EFBFBD><EBBFAA>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>д<EFBFBD>˲<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҿ<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD>ܣ<EFBFBD>ʵ<EFBFBD><EFBFBD><EFBFBD>˼<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뷿<EFBFBD><EBB7BF><EFBFBD><D7BC><EFBFBD>ȹ<EFBFBD><C8B9><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>ǣ<EFBFBD><EFBFBD><EFBFBD>֪<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʲô<EFBFBD><EFBFBD><EFBFBD>⣬<EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD>֪<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD>Ҳ²<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⡣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⡣
|
||||||
|
ȥȺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><EFBFBD><EFBFBD>Ȼû<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⣬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD>˺ܶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>֪ʶ
|
||||||
|
<EFBFBD>Ҿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2018/2/25 <20>ڶ<EFBFBD><DAB6><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD><EFBFBD>ԣ<EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҿ<EFBFBD>֮ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>[<5B><><EFBFBD><EFBFBD>]<5D>ı<EFBFBD>ǩ
|
||||||
|
<EFBFBD><EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD><EFBFBD><EFBFBD>ˡ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD>ҽ<EFBFBD>֮ǰ<EFBFBD><EFBFBD>Ŀ<EFBFBD>Ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD>ʶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>ID<EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><EFBFBD>ö<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD>ϴε<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD>Ҳû<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>イ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴη<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʲô<EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>ʱ<EFBFBD>䣬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><EFBFBD><EFBFBD>˻<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䣬<EFBFBD><E4A3AC><EFBFBD>뷿<EFBFBD>䣬<EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>䡣
|
||||||
|
<EFBFBD>鿴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD>鿴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD>鿴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD><EFBFBD><EFBFBD>鿴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
Ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>ע<EFBFBD>Ṧ<EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD>浽<EFBFBD>˱<EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
2018/2/25 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD><EFBFBD><EFBFBD>ϧУʱ<EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD>ң<EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>ȥ<EFBFBD>ҹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˡ<EFBFBD>
|
||||||
|
|
||||||
|
ǰ<EFBFBD><EFBFBD>ƪ<EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><EFBFBD><EFBFBD>д<EFBFBD>ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫʵ<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
ʵ<EFBFBD>ֻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㲥
|
||||||
|
<EFBFBD><EFBFBD>/ȡ<><C8A1><EFBFBD><D7BC>
|
||||||
|
<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>
|
||||||
|
ϴ<EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>꣬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɡ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD>鿴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㲥 <20><><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⣬if (proom = nullptr)
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>ǣ<EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>Ϸ <20><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
ϴ<EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮȺ<EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD>Ҿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ
|
||||||
|
<EFBFBD><EFBFBD>ijλ<EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>մ<EFBFBD><EFBFBD><EFBFBD>ÿλ<EFBFBD><EFBFBD><EFBFBD>Ҿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><EFBFBD>һ<EFBFBD>Ρ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļ<EFBFBD><EFBFBD>ᡣ
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҡ<EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڡ<EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҡ<EFBFBD>
|
||||||
|
ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>Σ<EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> *2 <20><>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BUG<EFBFBD><EFBFBD><EFBFBD>࣬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
|
||||||
|
2018/2/27 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ü<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϳ<EFBFBD>ʼд<EFBFBD><EFBFBD><EFBFBD>ƹ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
14:00 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD>ʼд<EFBFBD><EFBFBD><EFBFBD>ƹ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD>ж<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
2018/2/28 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD> "<22><>"
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD> "<22><>", "<22><><EFBFBD><EFBFBD>"
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣָ<EFBFBD><EFBFBD> "<22><>" <20><><EFBFBD><EFBFBD> "<22><> <20>㵹<EFBFBD>ǿ<EFBFBD><C7BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD>"
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ٴ<EFBFBD><D9B4><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD>Ϸ<EFBFBD><CFB7>ֱ<EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>Ż<EFBFBD><C5BB><EFBFBD>ʾ<EFBFBD><CABE>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƶõ<C6B5><C3B5>ƾ<EFBFBD><C6BE><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Ϣ<EFBFBD>ظ<EFBFBD>
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڷ<EFBFBD><DAB7><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȥ<><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣʱ<CFA2><CAB1><EFBFBD>ط<EFBFBD><D8B7>ͳɹ<CDB3><C9B9>Ļظ<C4BB>
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>
|
BIN
Landlords/stdafx.cpp
Normal file
BIN
Landlords/stdafx.cpp
Normal file
Binary file not shown.
BIN
Landlords/stdafx.h
Normal file
BIN
Landlords/stdafx.h
Normal file
Binary file not shown.
BIN
Landlords/targetver.h
Normal file
BIN
Landlords/targetver.h
Normal file
Binary file not shown.
Reference in New Issue
Block a user