├── .gitattributes
├── src
├── Domain.Unity3D
│ ├── Properties
│ │ ├── Akka.Interfaced.CodeGen.cs
│ │ └── AssemblyInfo.cs
│ ├── packages.config
│ └── Workaround
│ │ └── UnityIl2cppWorkaround.cs
├── GameClient
│ ├── ColorTheme.png
│ ├── ProjectSettings
│ │ ├── ProjectVersion.txt
│ │ ├── ClusterInputManager.asset
│ │ ├── NetworkManager.asset
│ │ ├── TimeManager.asset
│ │ ├── UnityAdsSettings.asset
│ │ ├── EditorBuildSettings.asset
│ │ ├── UnityConnectSettings.asset
│ │ ├── AudioManager.asset
│ │ ├── EditorSettings.asset
│ │ ├── TagManager.asset
│ │ ├── DynamicsManager.asset
│ │ ├── Physics2DSettings.asset
│ │ ├── NavMeshAreas.asset
│ │ └── GraphicsSettings.asset
│ ├── Assets
│ │ ├── UI
│ │ │ ├── Icon
│ │ │ │ ├── App.png
│ │ │ │ └── App.png.meta
│ │ │ ├── Font
│ │ │ │ ├── FontAwesome.otf
│ │ │ │ ├── OpenSans-Regular.ttf
│ │ │ │ ├── FontAwesome.otf.meta
│ │ │ │ └── OpenSans-Regular.ttf.meta
│ │ │ ├── Resources
│ │ │ │ ├── InputBox.prefab.meta
│ │ │ │ ├── MessageBox.prefab.meta
│ │ │ │ └── MessageQuestionBox.prefab.meta
│ │ │ ├── Font.meta
│ │ │ ├── Icon.meta
│ │ │ └── Resources.meta
│ │ ├── Scripts
│ │ │ ├── Domain.Unity3D.dll
│ │ │ ├── Domain.Unity3D.ProtobufSerializer.dll
│ │ │ ├── Base.meta
│ │ │ ├── Game.meta
│ │ │ ├── Scenes.meta
│ │ │ ├── Utility.meta
│ │ │ ├── Base
│ │ │ │ ├── G.cs.meta
│ │ │ │ ├── LoginProcessor.cs.meta
│ │ │ │ ├── UserEventProcessor.cs.meta
│ │ │ │ ├── UserEventProcessor.cs
│ │ │ │ └── G.cs
│ │ │ ├── Game
│ │ │ │ ├── GameBoard.cs.meta
│ │ │ │ ├── GamePlayerPlate.cs.meta
│ │ │ │ ├── GamePlayerPlate.cs
│ │ │ │ └── GameBoard.cs
│ │ │ ├── GridAnimation.cs.meta
│ │ │ ├── Scenes
│ │ │ │ ├── GameScene.cs.meta
│ │ │ │ └── MainScene.cs.meta
│ │ │ ├── UserInfoDialogBox.cs.meta
│ │ │ ├── Utility
│ │ │ │ ├── AppPanel.cs.meta
│ │ │ │ ├── Version.cs.meta
│ │ │ │ ├── SpinRotator.cs.meta
│ │ │ │ ├── UnityCloudBuildManifest.cs.meta
│ │ │ │ ├── AppPanel.cs
│ │ │ │ ├── SpinRotator.cs
│ │ │ │ ├── UnityCloudBuildManifest.cs
│ │ │ │ └── Version.cs
│ │ │ ├── Domain.Unity3D.dll.meta
│ │ │ ├── Domain.Unity3D.ProtobufSerializer.dll.meta
│ │ │ ├── UserInfoDialogBox.cs
│ │ │ └── GridAnimation.cs
│ │ ├── UnityPackages.meta
│ │ ├── UnityPackages
│ │ │ ├── DOTween
│ │ │ │ ├── DOTween.dll
│ │ │ │ ├── DOTween43.dll
│ │ │ │ ├── DOTween46.dll
│ │ │ │ ├── DOTween50.dll
│ │ │ │ ├── DOTween.dll.mdb
│ │ │ │ ├── DOTween43.dll.mdb
│ │ │ │ ├── DOTween46.dll.mdb
│ │ │ │ ├── DOTween50.dll.mdb
│ │ │ │ ├── Editor
│ │ │ │ │ ├── Imgs
│ │ │ │ │ │ ├── Footer.png
│ │ │ │ │ │ ├── Header.jpg
│ │ │ │ │ │ ├── DOTweenIcon.png
│ │ │ │ │ │ ├── Footer_dark.png
│ │ │ │ │ │ ├── Footer.png.meta
│ │ │ │ │ │ ├── Header.jpg.meta
│ │ │ │ │ │ ├── DOTweenIcon.png.meta
│ │ │ │ │ │ └── Footer_dark.png.meta
│ │ │ │ │ ├── DOTweenEditor.dll
│ │ │ │ │ ├── DOTweenEditor.dll.mdb
│ │ │ │ │ ├── DOTweenEditor.XML.meta
│ │ │ │ │ ├── DOTweenEditor.dll.mdb.meta
│ │ │ │ │ ├── Imgs.meta
│ │ │ │ │ ├── DOTweenEditor.dll.meta
│ │ │ │ │ └── DOTweenEditor.XML
│ │ │ │ ├── DOTween.XML.meta
│ │ │ │ ├── DOTween.dll.mdb.meta
│ │ │ │ ├── DOTween43.dll.mdb.meta
│ │ │ │ ├── DOTween43.xml.meta
│ │ │ │ ├── DOTween46.dll.mdb.meta
│ │ │ │ ├── DOTween46.xml.meta
│ │ │ │ ├── DOTween50.dll.mdb.meta
│ │ │ │ ├── DOTween50.xml.meta
│ │ │ │ ├── Editor.meta
│ │ │ │ ├── DOTween.dll.meta
│ │ │ │ ├── DOTween43.dll.meta
│ │ │ │ ├── DOTween46.dll.meta
│ │ │ │ └── DOTween50.dll.meta
│ │ │ ├── JsonNet.meta
│ │ │ ├── JsonNet.unitypackage.json.meta
│ │ │ ├── TypeAlias.meta
│ │ │ ├── TypeAlias.unitypackage.json.meta
│ │ │ ├── TypeAlias
│ │ │ │ ├── TypeAlias.dll
│ │ │ │ ├── TypeAlias.dll.mdb
│ │ │ │ ├── TypeAlias.dll.mdb.meta
│ │ │ │ └── TypeAlias.dll.meta
│ │ │ ├── UiManager.meta
│ │ │ ├── UiManager.unitypackage.json.meta
│ │ │ ├── AkkaInterfaced.meta
│ │ │ ├── AkkaInterfaced.unitypackage.json.meta
│ │ │ ├── CommonLogging.meta
│ │ │ ├── CommonLogging.unitypackage.json.meta
│ │ │ ├── LidgrenUdpNet.meta
│ │ │ ├── LidgrenUdpNet.unitypackage.json.meta
│ │ │ ├── TrackableData.meta
│ │ │ ├── TrackableData.unitypackage.json.meta
│ │ │ ├── protobuf-net.meta
│ │ │ ├── protobuf-net.unitypackage.json.meta
│ │ │ ├── JsonNet
│ │ │ │ ├── Newtonsoft.Json.dll
│ │ │ │ ├── Newtonsoft.Json.dll.mdb
│ │ │ │ ├── Newtonsoft.Json.dll.mdb.meta
│ │ │ │ └── Newtonsoft.Json.dll.meta
│ │ │ ├── NetLegacySupport.meta
│ │ │ ├── NetLegacySupport.unitypackage.json.meta
│ │ │ ├── AkkaInterfacedSlimSocket.meta
│ │ │ ├── AkkaInterfacedSlimSocket.unitypackage.json.meta
│ │ │ ├── LidgrenUdpNet
│ │ │ │ ├── LidgrenUdpNet.dll
│ │ │ │ ├── LidgrenUdpNet.dll.mdb
│ │ │ │ ├── LidgrenUdpNet.dll.mdb.meta
│ │ │ │ └── LidgrenUdpNet.dll.meta
│ │ │ ├── TrackableData
│ │ │ │ ├── TrackableData.dll
│ │ │ │ ├── TrackableData.Json.dll
│ │ │ │ ├── TrackableData.dll.mdb
│ │ │ │ ├── TrackableData.Json.dll.mdb
│ │ │ │ ├── TrackableData.Protobuf.dll
│ │ │ │ ├── TrackableData.Protobuf.dll.mdb
│ │ │ │ ├── TrackableData.dll.mdb.meta
│ │ │ │ ├── TrackableData.Json.dll.mdb.meta
│ │ │ │ ├── TrackableData.Protobuf.dll.mdb.meta
│ │ │ │ ├── TrackableData.dll.meta
│ │ │ │ ├── TrackableData.Json.dll.meta
│ │ │ │ └── TrackableData.Protobuf.dll.meta
│ │ │ ├── protobuf-net
│ │ │ │ ├── protobuf-net.dll
│ │ │ │ └── protobuf-net.dll.meta
│ │ │ ├── AkkaInterfacedSlimSocket
│ │ │ │ ├── ChannelEventDispatcher.cs.meta
│ │ │ │ ├── UnitySlimTaskFactory.cs.meta
│ │ │ │ ├── UnityCommunicatorFactory.cs.meta
│ │ │ │ ├── UnitySlimTaskCompletionSource.cs.meta
│ │ │ │ ├── Akka.Interfaced.SlimSocket.Base.dll
│ │ │ │ ├── Akka.Interfaced.SlimSocket.Client.dll
│ │ │ │ ├── Akka.Interfaced.SlimSocket.Base.dll.mdb
│ │ │ │ ├── Akka.Interfaced.SlimSocket.Client.dll.mdb
│ │ │ │ ├── Akka.Interfaced.SlimSocket.Base.dll.mdb.meta
│ │ │ │ ├── Akka.Interfaced.SlimSocket.Client.dll.mdb.meta
│ │ │ │ ├── UnitySlimTaskFactory.cs
│ │ │ │ ├── Akka.Interfaced.SlimSocket.Base.dll.meta
│ │ │ │ ├── Akka.Interfaced.SlimSocket.Client.dll.meta
│ │ │ │ ├── UnityCommunicatorFactory.cs
│ │ │ │ ├── ChannelEventDispatcher.cs
│ │ │ │ └── UnitySlimTaskCompletionSource.cs
│ │ │ ├── CommonLogging
│ │ │ │ ├── Common.Logging.dll
│ │ │ │ ├── Common.Logging.dll.mdb
│ │ │ │ ├── Common.Logging.Core.dll
│ │ │ │ ├── Common.Logging.Core.dll.mdb
│ │ │ │ ├── Common.Logging.Extensions.dll
│ │ │ │ ├── Common.Logging.Extensions.dll.mdb
│ │ │ │ ├── Common.Logging.dll.mdb.meta
│ │ │ │ ├── Common.Logging.Core.dll.mdb.meta
│ │ │ │ ├── Common.Logging.dll.meta
│ │ │ │ ├── Common.Logging.Core.dll.meta
│ │ │ │ ├── Common.Logging.Extensions.dll.mdb.meta
│ │ │ │ └── Common.Logging.Extensions.dll.meta
│ │ │ ├── AkkaInterfaced
│ │ │ │ ├── Akka.Interfaced-Base.dll
│ │ │ │ ├── Akka.Interfaced-Base.dll.mdb
│ │ │ │ ├── Akka.Interfaced-Base.dll.mdb.meta
│ │ │ │ └── Akka.Interfaced-Base.dll.meta
│ │ │ ├── NetLegacySupport
│ │ │ │ ├── NetLegacySupport.Tuple.dll
│ │ │ │ ├── NetLegacySupport.Action.dll
│ │ │ │ ├── NetLegacySupport.Action.dll.mdb
│ │ │ │ ├── NetLegacySupport.Tuple.dll.mdb
│ │ │ │ ├── NetLegacySupport.ConcurrentDictionary.dll
│ │ │ │ ├── NetLegacySupport.ConcurrentDictionary.dll.mdb
│ │ │ │ ├── NetLegacySupport.Action.dll.mdb.meta
│ │ │ │ ├── NetLegacySupport.Action.dll.meta
│ │ │ │ ├── NetLegacySupport.Tuple.dll.mdb.meta
│ │ │ │ ├── NetLegacySupport.Tuple.dll.meta
│ │ │ │ ├── NetLegacySupport.ConcurrentDictionary.dll.mdb.meta
│ │ │ │ └── NetLegacySupport.ConcurrentDictionary.dll.meta
│ │ │ ├── protobuf-net.unitypackage.json
│ │ │ ├── DOTween.meta
│ │ │ ├── CodeAnalysisVsHook.meta
│ │ │ ├── CodeAnalysisVsHook
│ │ │ │ ├── Editor.meta
│ │ │ │ └── Editor
│ │ │ │ │ ├── CodeAnalysisVsHook.cs.meta
│ │ │ │ │ └── CodeAnalysisVsHook.cs
│ │ │ ├── UiManager
│ │ │ │ ├── UiDialog.cs.meta
│ │ │ │ ├── UiManager.cs.meta
│ │ │ │ ├── UiHelper.cs.meta
│ │ │ │ ├── UiInputBox.cs.meta
│ │ │ │ ├── UiDialogHandle.cs.meta
│ │ │ │ ├── UiMessageBox.cs.meta
│ │ │ │ ├── UiDialogHandle.cs
│ │ │ │ ├── UiDialog.cs
│ │ │ │ ├── UiHelper.cs
│ │ │ │ ├── UiInputBox.cs
│ │ │ │ └── UiMessageBox.cs
│ │ │ ├── AkkaInterfaced.unitypackage.json
│ │ │ ├── LidgrenUdpNet.unitypackage.json
│ │ │ ├── JsonNet.unitypackage.json
│ │ │ ├── NetLegacySupport.unitypackage.json
│ │ │ ├── CommonLogging.unitypackage.json
│ │ │ ├── TypeAlias.unitypackage.json
│ │ │ ├── TrackableData.unitypackage.json
│ │ │ └── UiManager.unitypackage.json
│ │ ├── link.xml.meta
│ │ ├── Scenes
│ │ │ ├── GameScene.unity.meta
│ │ │ ├── MainScene.unity.meta
│ │ │ ├── Component
│ │ │ │ ├── GameBoard.prefab.meta
│ │ │ │ └── GamePlayerPlate.prefab.meta
│ │ │ └── Component.meta
│ │ ├── UI.meta
│ │ ├── Scenes.meta
│ │ ├── Scripts.meta
│ │ └── link.xml
│ ├── .gitignore
│ └── UnityPackages.json
├── Domain
│ ├── Interface
│ │ ├── IUserPairingObserver.cs
│ │ ├── IUserLogin.cs
│ │ ├── IUserEventObserver.cs
│ │ ├── IGameUserObserver.cs
│ │ ├── IUserInitiator.cs
│ │ ├── IGamePairMaker.cs
│ │ ├── IUser.cs
│ │ ├── IGamePlayer.cs
│ │ ├── IGame.cs
│ │ ├── IGameObserver.cs
│ │ ├── GameTypes.cs
│ │ └── ResultException.cs
│ ├── Game
│ │ ├── Rule.cs
│ │ ├── PlacePosition.cs
│ │ └── Logic.cs
│ ├── Workaround
│ │ └── ProtobufSurrogateDirectives.cs
│ ├── Data
│ │ ├── IUserContext.cs
│ │ ├── IUserData.cs
│ │ └── UserAchievement.cs
│ ├── app.config
│ ├── packages.config
│ └── Properties
│ │ └── AssemblyInfo.cs
├── GameServer
│ ├── ClusterNodeContext.cs
│ ├── Program.cs
│ ├── MongoDbStorage.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── GameService.cs
│ ├── UserLoginActor.cs
│ ├── app.config
│ ├── packages.config
│ ├── Authenticator.cs
│ └── GameBotActor.cs
├── Domain.Tests
│ ├── app.config
│ ├── packages.config
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── LogicTest.cs
└── GameServer.Tests
│ ├── MongoDbStorageFixture.cs
│ ├── App.config
│ ├── AuthenticatorTest.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── UserLoginActorTest.cs
│ ├── ClusterContextFixture.cs
│ ├── packages.config
│ └── MockClient.cs
├── docs
└── ScreenShot.jpg
├── tools
└── nuget
│ ├── nuget.exe
│ ├── packages.config
│ └── NuGet.Config
├── .editorconfig
├── appveyor.yml
├── README.md
├── LICENSE
├── .gitignore
└── TicTacToe.sln
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/src/Domain.Unity3D/Properties/Akka.Interfaced.CodeGen.cs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/ScreenShot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/docs/ScreenShot.jpg
--------------------------------------------------------------------------------
/tools/nuget/nuget.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/tools/nuget/nuget.exe
--------------------------------------------------------------------------------
/tools/nuget/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/GameClient/ColorTheme.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/ColorTheme.png
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 5.3.5f1
2 | m_StandardAssetsVersion: 0
3 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI/Icon/App.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UI/Icon/App.png
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI/Font/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UI/Font/FontAwesome.otf
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Domain.Unity3D.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/Scripts/Domain.Unity3D.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI/Font/OpenSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UI/Font/OpenSans-Regular.ttf
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c6f56356a2b35684b5f54f789b789d3e
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/DOTween.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween43.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/DOTween43.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween46.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/DOTween46.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween50.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/DOTween50.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/DOTween.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/JsonNet.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: af0406f5930e589db58fb8338d5d91c2
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/JsonNet.unitypackage.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cc20ca1b9dc45b619a5bf851837691b9
3 | TextScriptImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TypeAlias.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a1e1b981e6c25ccaaf9b8311fa881e11
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TypeAlias.unitypackage.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 382dc954f04d5d6793e868503a9b6599
3 | TextScriptImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TypeAlias/TypeAlias.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/TypeAlias/TypeAlias.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a5075cfba23c568e85280a4f2d89a2d9
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager.unitypackage.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6e50ca044c215ada86cf19579f3e1522
3 | TextScriptImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfaced.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3e913dba231d54179581f6e769337aaf
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfaced.unitypackage.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 53d7424426cb5b6c99822b07cc687abe
3 | TextScriptImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 71a73a78add353a9b949e1cabb6a2cb9
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging.unitypackage.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a4209abf60305b139cfbe093122b023e
3 | TextScriptImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween43.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/DOTween43.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween46.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/DOTween46.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween50.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/DOTween50.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/LidgrenUdpNet.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4c12e315280b5d249e13c580e1e7dbcf
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/LidgrenUdpNet.unitypackage.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 98b27a0f19835f448c7e4508be3f42e3
3 | TextScriptImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f54eb2348d305a11b91139272bf0311b
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData.unitypackage.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 805609aa716753d9ae3f666c68134af9
3 | TextScriptImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/protobuf-net.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5607ed5b44575dbebd43201a78bcbe2f
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/protobuf-net.unitypackage.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d84d8ec3f30a5deeaada2d601da65d6c
3 | TextScriptImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/JsonNet/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/JsonNet/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fc140aa0dc115c859737925a31f9de46
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport.unitypackage.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1517746b7868577981ad4a09b5a4da46
3 | TextScriptImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TypeAlias/TypeAlias.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/TypeAlias/TypeAlias.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Domain.Unity3D.ProtobufSerializer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/Scripts/Domain.Unity3D.ProtobufSerializer.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 03ada339cf2d59df86958e976bb597e7
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket.unitypackage.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d7a79cc161055039a84f0e07b527e5c9
3 | TextScriptImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs/Footer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs/Footer.png
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs/Header.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs/Header.jpg
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/JsonNet/Newtonsoft.Json.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/JsonNet/Newtonsoft.Json.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/LidgrenUdpNet/LidgrenUdpNet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/LidgrenUdpNet/LidgrenUdpNet.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/protobuf-net/protobuf-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/protobuf-net/protobuf-net.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/ChannelEventDispatcher.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 63df13a909b85f9883ee58b62ed4bff8
3 | DefaultImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/UnitySlimTaskFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2edda98f30f05b5faaa829c9cdb72391
3 | DefaultImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/DOTweenEditor.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/Editor/DOTweenEditor.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/UnityCommunicatorFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e25c2148c59655e28fda1bc4eaf39917
3 | DefaultImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/DOTweenEditor.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/Editor/DOTweenEditor.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs/DOTweenIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs/DOTweenIcon.png
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs/Footer_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs/Footer_dark.png
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/LidgrenUdpNet/LidgrenUdpNet.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/LidgrenUdpNet/LidgrenUdpNet.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.Json.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/UnitySlimTaskCompletionSource.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 04f066c38d265d979e91eb613831ffb4
3 | DefaultImporter:
4 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.Core.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfaced/Akka.Interfaced-Base.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/AkkaInterfaced/Akka.Interfaced-Base.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.Core.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.Core.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.Json.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.Json.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.Protobuf.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.Protobuf.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfaced/Akka.Interfaced-Base.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/AkkaInterfaced/Akka.Interfaced-Base.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.Extensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.Extensions.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Tuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Tuple.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Action.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Action.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.Protobuf.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.Protobuf.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.Extensions.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.Extensions.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Action.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Action.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Tuple.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Tuple.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/protobuf-net.unitypackage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Id": "protobuf-net",
3 | "Version": "2.1.0-alpha-1",
4 | "Description": "Nuget package (TFM:net30)",
5 | "Files": [
6 | "protobuf-net.dll"
7 | ]
8 | }
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/NetworkManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!149 &1
4 | NetworkManager:
5 | m_ObjectHideFlags: 0
6 | m_DebugLevel: 0
7 | m_Sendrate: 15
8 | m_AssetToPrefab: {}
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/JsonNet/Newtonsoft.Json.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9d84eeb258e65c169f0958973f6d2099
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.ConcurrentDictionary.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.ConcurrentDictionary.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TypeAlias/TypeAlias.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f24cec78b83855f499f0fc00e9640caf
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TypeAlias/TypeAlias.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 86174a0992215b488a1990fbd4f85082
3 | MonoAssemblyImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/Akka.Interfaced.SlimSocket.Base.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/Akka.Interfaced.SlimSocket.Base.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a7ce60b26b775e719112295f34d853ce
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/LidgrenUdpNet/LidgrenUdpNet.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b2e06e29cfc75a3f93917de1d980bb6c
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/LidgrenUdpNet/LidgrenUdpNet.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a1c0e3637ce257d290c74cd4ca7fbd91
3 | MonoAssemblyImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2063ef80458f5f61b003a946fe4217cb
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/link.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cc61369e9f61a2343894fc1fe8eb7d6b
3 | timeCreated: 1450837610
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*.{cs, py, fsx}]
4 | indent_style = space
5 | indent_size = 4
6 | trim_trailing_whitespace = true
7 | insert_final_newline = true
8 |
9 | [*.{json, xml}]
10 | indent_style = space
11 | indent_size = 2
12 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/Akka.Interfaced.SlimSocket.Client.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/Akka.Interfaced.SlimSocket.Client.dll
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.Core.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8ae2a3047cc15314aac0bd33e08b9fe0
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 802633c9400b5afabc999a7cce79b1f6
3 | MonoAssemblyImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.ConcurrentDictionary.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.ConcurrentDictionary.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.Json.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 55f9dc5a97cf5700ad46b612e499e8ca
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scenes/GameScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 910a7c1b59e59e547b5d9c114f404402
3 | timeCreated: 1445908678
4 | licenseType: Pro
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scenes/MainScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 39605e5026ac1474a90727fb0ded5329
3 | timeCreated: 1445829779
4 | licenseType: Pro
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfaced/Akka.Interfaced-Base.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a0f24b4f6a3358fe8b0bf952f073ca59
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/Akka.Interfaced.SlimSocket.Base.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/Akka.Interfaced.SlimSocket.Base.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/Akka.Interfaced.SlimSocket.Client.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SaladLab/TicTacToe/HEAD/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/Akka.Interfaced.SlimSocket.Client.dll.mdb
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.Core.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 18e83e85e8af585f964dbbb5a44cfb76
3 | MonoAssemblyImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.Protobuf.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 12a55164485753d58a2bb963f88f48f8
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.Extensions.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 260e0cc54d315e85a6642e7285c2cead
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging/Common.Logging.Extensions.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5b83dcf65b4e572dadec17c4fba310ab
3 | MonoAssemblyImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Action.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a4f79775b26c5e5aa01e61fce634179b
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Action.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0926cb56577f5239a7c73c34335d8451
3 | MonoAssemblyImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Tuple.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 82970df46baf55c5818f9bb52dc81e45
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Tuple.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fff91e999bdb53f89f045e9ef0bbfcb1
3 | MonoAssemblyImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/Domain/Interface/IUserPairingObserver.cs:
--------------------------------------------------------------------------------
1 | using Akka.Interfaced;
2 |
3 | namespace Domain
4 | {
5 | public interface IUserPairingObserver : IInterfacedObserver
6 | {
7 | void MakePair(long gameId, string opponentName);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a5de6ccc68d6b1c46a959421c7c4b85c
3 | folderAsset: yes
4 | timeCreated: 1445997954
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI/Resources/InputBox.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a56fdd53e421e1546a0f7bebd66dbe47
3 | timeCreated: 1468371802
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI/Resources/MessageBox.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e36eda1cda269db4982baf3afa8b67a3
3 | timeCreated: 1445998981
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 451f659a1c51ae143aaf5e625befa361
3 | folderAsset: yes
4 | timeCreated: 1445829779
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scenes/Component/GameBoard.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b6de90801f4913a4e8401d88dfaf5ca6
3 | timeCreated: 1446128164
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d8f98b954eefd2f4596d452c31305473
3 | folderAsset: yes
4 | timeCreated: 1445842361
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI/Font.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 50fd5874ba2cbd54c9a0632dac0589d9
3 | folderAsset: yes
4 | timeCreated: 1445948494
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI/Icon.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d2f99b1ee8f9d9a4fac711a061de9109
3 | folderAsset: yes
4 | timeCreated: 1450769632
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween.XML.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5ec570c4aad08e54aa562697147a6947
3 | timeCreated: 1468300906
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c2dfc56de474cf43acb60e5b0ba64c9
3 | timeCreated: 1468300896
4 | licenseType: Pro
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween43.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8d6e6108f6d152742bbfe26bcf181ae7
3 | timeCreated: 1468300923
4 | licenseType: Pro
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween43.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2289fa5195f45c144b0692b525aba2f2
3 | timeCreated: 1468300927
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween46.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6d7898fcc5798124ebb3d40df75751ac
3 | timeCreated: 1468300923
4 | licenseType: Pro
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween46.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b496988b1a113f64496b0660f9da9221
3 | timeCreated: 1468300927
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween50.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 21f67ed711cd0fb4193e71c0cda77607
3 | timeCreated: 1468300923
4 | licenseType: Pro
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween50.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: efc6a57c189c39f4a8fe55fe400e1abd
3 | timeCreated: 1468300927
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scenes/Component/GamePlayerPlate.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9f9c4fbc23348ed4fa7605325b80c98f
3 | timeCreated: 1446128162
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Base.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 20b2f6f575db07d4590c658e3cc88e4d
3 | folderAsset: yes
4 | timeCreated: 1441091689
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Game.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3a937eb717e1e8f42aeaf5bac247edc8
3 | folderAsset: yes
4 | timeCreated: 1450853891
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 780feb3a270df3b488042274d9aad4de
3 | folderAsset: yes
4 | timeCreated: 1445843336
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI/Resources.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0d7456ed5fdc44e4bb880dd9dbf1ead3
3 | folderAsset: yes
4 | timeCreated: 1445997974
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI/Resources/MessageQuestionBox.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 59a28f141a999c1489f884ee79a90a1c
3 | timeCreated: 1445998983
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/Akka.Interfaced.SlimSocket.Base.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d1affdae78ba5e448394b22e52dda5fb
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/Akka.Interfaced.SlimSocket.Client.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 24fcaed46b0f50c0b09165906a3166e2
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.ConcurrentDictionary.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a555f73aebd650578cea1adfd3c83d1c
3 | DefaultImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport/NetLegacySupport.ConcurrentDictionary.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 25ca39d0c68d5ab3bffedb1d54535698
3 | MonoAssemblyImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | userData:
--------------------------------------------------------------------------------
/src/Domain/Game/Rule.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Domain
4 | {
5 | public static class Rule
6 | {
7 | public static readonly int BoardSize = 3;
8 | public static readonly TimeSpan TurnTimeout = TimeSpan.FromSeconds(10);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scenes/Component.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c40f428e1e29f1844a92cc7b45b2405b
3 | folderAsset: yes
4 | timeCreated: 1445997312
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Utility.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ada3ec9a1058e3b4eacf022cb962e1e4
3 | folderAsset: yes
4 | timeCreated: 1450853891
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/DOTweenEditor.XML.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5405503ee5afddc42bf1b95cabc6ad89
3 | timeCreated: 1468300906
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/DOTweenEditor.dll.mdb.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3402d640d15ce8e4bb99cb4cbb26ea7d
3 | timeCreated: 1468300896
4 | licenseType: Pro
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b8e523184a9a01946bd787930068b09d
3 | folderAsset: yes
4 | timeCreated: 1461571758
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dc07aa68bedd51f4e86b9299952a104b
3 | folderAsset: yes
4 | timeCreated: 1461571758
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CodeAnalysisVsHook.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 54c696c57981a724faceed7d11653050
3 | folderAsset: yes
4 | timeCreated: 1461592681
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d9948f671acbc134caee47550ab6231c
3 | folderAsset: yes
4 | timeCreated: 1461571758
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CodeAnalysisVsHook/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8fc20d98d8f11784caf438956a4b7270
3 | folderAsset: yes
4 | timeCreated: 1461591943
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/src/Domain/Interface/IUserLogin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Akka.Interfaced;
4 |
5 | namespace Domain
6 | {
7 | public interface IUserLogin : IInterfacedActor
8 | {
9 | Task> Login(string id, string password);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Domain/Interface/IUserEventObserver.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Akka.Interfaced;
3 | using Domain;
4 |
5 | namespace Domain
6 | {
7 | public interface IUserEventObserver : IInterfacedObserver
8 | {
9 | void UserContextChange(TrackableUserContextTracker userContextTracker);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/UnityAdsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!292 &1
4 | UnityAdsSettings:
5 | m_ObjectHideFlags: 0
6 | m_Enabled: 0
7 | m_InitializeOnStartup: 1
8 | m_TestMode: 0
9 | m_EnabledPlatforms: 4294967295
10 | m_IosGameId:
11 | m_AndroidGameId:
12 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager/UiDialog.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4c96b2ddaea6e4045893551933a29291
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager/UiManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 779638fe2a14b9240900b38f23f4d799
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/src/Domain/Workaround/ProtobufSurrogateDirectives.cs:
--------------------------------------------------------------------------------
1 | using Domain;
2 | using ProtoBuf;
3 | using TrackableData.Protobuf;
4 |
5 | namespace Domain
6 | {
7 | [ProtoContract]
8 | public class ProtobufSurrogateDirectives
9 | {
10 | public TrackableDictionaryTrackerSurrogate T1;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: 1.0.0.{build}
2 | os: Visual Studio 2015
3 | services:
4 | - mongodb
5 | environment:
6 | COVERALLSKEY:
7 | secure: xKdlZl4wNnzXkiLIb456OFGuLX/BqTJ9XmQUFwIzrjmwAdyDEv/svJXNH3HnvH3q
8 | test: off
9 | build_script:
10 | - cmd: build.cmd ci coverallskey=%COVERALLSKEY%
11 | cache:
12 | - packages -> **\packages.config
13 |
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes:
8 | - enabled: 1
9 | path: Assets/Scenes/MainScene.unity
10 | - enabled: 1
11 | path: Assets/Scenes/GameScene.unity
12 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Base/G.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 19bff1c98fa02c048aeca1990441548b
3 | timeCreated: 1441091829
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Game/GameBoard.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4aae82df6228403429857e90b40a1595
3 | timeCreated: 1446123369
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/GridAnimation.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 474d62694009ea84089cddbf82079ffb
3 | timeCreated: 1445869215
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Scenes/GameScene.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 87f22e88164101d4e894e7f964ccd77b
3 | timeCreated: 1445843366
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Scenes/MainScene.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a147a03a40b0ebe41a70fa33b69c8435
3 | timeCreated: 1445909107
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/UserInfoDialogBox.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 268e38e7eed8c0243aea66ab132f572a
3 | timeCreated: 1446535739
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Utility/AppPanel.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 909bb15b3a70b9c43a2cab06bb777a68
3 | timeCreated: 1450844754
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Utility/Version.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b9f077f6c6d898c40b29f572ae526d95
3 | timeCreated: 1450842045
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/Domain/Interface/IGameUserObserver.cs:
--------------------------------------------------------------------------------
1 | using Akka.Interfaced;
2 | using Domain;
3 |
4 | namespace Domain
5 | {
6 | // It's an observer monitoring major events for IUserActor
7 | public interface IGameUserObserver : IInterfacedObserver
8 | {
9 | void Begin(long gameId);
10 | void End(long gameId, GameResult result);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Base/LoginProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 70514083d613a2645b978aabd9c16156
3 | timeCreated: 1446173528
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Game/GamePlayerPlate.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: db9fb988f6e001846ba369578d6fbace
3 | timeCreated: 1446127987
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Utility/SpinRotator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1dd8b6888d8d50043b87db246fefe410
3 | timeCreated: 1445954315
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Base/UserEventProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1fb3588cebac81044912c6b51b08876d
3 | timeCreated: 1464662191
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager/UiHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 27242495700aa2e47af0d1b82e4b2349
3 | timeCreated: 1442287227
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager/UiInputBox.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fb3a373a3db82d441a22ee5edca52dd7
3 | timeCreated: 1468367085
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Utility/UnityCloudBuildManifest.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0b76588c9b2dd5d4688adc04ae5647b8
3 | timeCreated: 1450842496
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager/UiDialogHandle.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b636a271260ae3f4f8aef6421616d78a
3 | timeCreated: 1445999278
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager/UiMessageBox.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f0a85c8628e14e04480a60a7eba33e4d
3 | timeCreated: 1445999170
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/Domain/Interface/IUserInitiator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Akka.Interfaced;
4 |
5 | namespace Domain
6 | {
7 | public interface IUserInitiator : IInterfacedActor
8 | {
9 | Task Create(IUserEventObserver observer, string name);
10 | Task Load(IUserEventObserver observer);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/GameClient/.gitignore:
--------------------------------------------------------------------------------
1 | /[Ll]ibrary/
2 | /[Tt]emp/
3 | /[Oo]bj/
4 | /[Oo]utput/
5 | /[Bb]uild/
6 |
7 | # Autogenerated VS/MD solution and project files
8 | *.csproj
9 | *.unityproj
10 | *.sln
11 | *.suo
12 | *.tmp
13 | *.user
14 | *.userprefs
15 | *.pidb
16 | *.booproj
17 |
18 | # Unity3D generated meta files
19 | *.pidb.meta
20 |
21 | # Unity3D Generated File On Crash Reports
22 | sysinfo.txt
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CodeAnalysisVsHook/Editor/CodeAnalysisVsHook.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 306392ace64e24f439e3b04e76770427
3 | timeCreated: 1459906747
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | UnityPurchasingSettings:
7 | m_Enabled: 0
8 | m_TestMode: 0
9 | UnityAnalyticsSettings:
10 | m_Enabled: 0
11 | m_InitializeOnStartup: 1
12 | m_TestMode: 0
13 | m_TestEventUrl:
14 | m_TestConfigUrl:
15 |
--------------------------------------------------------------------------------
/src/Domain/Data/IUserContext.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ProtoBuf;
3 | using TrackableData;
4 |
5 | namespace Domain
6 | {
7 | [ProtoContract]
8 | public interface IUserContext : ITrackableContainer
9 | {
10 | [ProtoMember(1)] TrackableUserData Data { get; set; }
11 | [ProtoMember(2)] TrackableDictionary Achivements { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | m_Volume: 1
7 | Rolloff Scale: 1
8 | Doppler Factor: 1
9 | Default Speaker Mode: 2
10 | m_SampleRate: 0
11 | m_DSPBufferSize: 0
12 | m_VirtualVoiceCount: 512
13 | m_RealVoiceCount: 32
14 | m_SpatializerPlugin:
15 | m_DisableAudio: 0
16 |
--------------------------------------------------------------------------------
/src/Domain/Interface/IGamePairMaker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Threading.Tasks;
4 | using Akka.Interfaced;
5 |
6 | namespace Domain
7 | {
8 | public interface IGamePairMaker : IInterfacedActor
9 | {
10 | Task RegisterPairing(long userId, string userName, IUserPairingObserver observer);
11 | Task UnregisterPairing(long userId);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tools/nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/GameClient/UnityPackages.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "AkkaInterfacedSlimSocket": {
4 | "version": "0.5.*",
5 | "source": "github:SaladLab/Akka.Interfaced.SlimSocket"
6 | },
7 | "TrackableData": {
8 | "version": "1.*",
9 | "source": "github:SaladLab/TrackableData"
10 | },
11 | "UiManager": {
12 | "version": "1.*",
13 | "source": "github:SaladLab/Unity3D.UiManager"
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/Domain/Interface/IUser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Akka.Interfaced;
4 |
5 | namespace Domain
6 | {
7 | public interface IUser : IInterfacedActor
8 | {
9 | Task RegisterPairing(IUserPairingObserver observer);
10 | Task UnregisterPairing();
11 | Task> JoinGame(long gameId, IGameObserver observer);
12 | Task LeaveGame(long gameId);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Domain/Interface/IGamePlayer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using System.Collections.Generic;
4 | using Akka.Interfaced;
5 | using Domain;
6 |
7 | namespace Domain
8 | {
9 | // Player who is playing game
10 | [TagOverridable("playerUserId")]
11 | public interface IGamePlayer : IInterfacedActor
12 | {
13 | Task MakeMove(PlacePosition pos, long playerUserId = 0);
14 | Task Say(string msg, long playerUserId = 0);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfaced.unitypackage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Id": "AkkaInterfaced",
3 | "Version": "0.5.2",
4 | "Authors": [
5 | "Esun Kim"
6 | ],
7 | "Owners": [
8 | "Esun Kim"
9 | ],
10 | "Description": "Akka.Interfaced SlimClient for Unity3D",
11 | "MergedDependencies": {},
12 | "Files": [
13 | "Assets/UnityPackages/AkkaInterfaced/Akka.Interfaced-Base.dll",
14 | "Assets/UnityPackages/AkkaInterfaced/Akka.Interfaced-Base.dll.mdb"
15 | ]
16 | }
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager/UiDialogHandle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using UnityEngine;
4 |
5 | public class UiDialogHandle
6 | {
7 | public UiDialog Dialog;
8 | public Action Hidden;
9 | public bool Visible;
10 | public object ReturnValue;
11 |
12 | public IEnumerator WaitForHide()
13 | {
14 | while (Visible)
15 | {
16 | yield return null;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/UnitySlimTaskFactory.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Akka.Interfaced.SlimSocket.Client
4 | {
5 | public class UnitySlimTaskFactory : ISlimTaskFactory
6 | {
7 | internal MonoBehaviour Owner { get; set; }
8 |
9 | public ISlimTaskCompletionSource Create()
10 | {
11 | return new UnitySlimTaskCompletionSource { Owner = Owner };
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Utility/AppPanel.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 |
4 | public class AppPanel : MonoBehaviour
5 | {
6 | public Text VersionText;
7 |
8 | private void Start()
9 | {
10 | var commitId = string.IsNullOrEmpty(Version.CommitId)
11 | ? ""
12 | : "(" + Version.CommitId.Substring(0, 6) + ")";
13 | VersionText.text = "Ver: " + Version.VersionString + " " + commitId;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/LidgrenUdpNet.unitypackage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Id": "LidgrenUdpNet",
3 | "Version": "1.0.4",
4 | "Authors": [
5 | "Michael Lidgren"
6 | ],
7 | "Owners": [
8 | "Esun Kim"
9 | ],
10 | "Description": "Modifier version of Lidgren.Network",
11 | "Dependencies": {},
12 | "MergedDependencies": {},
13 | "Files": [
14 | "Assets/UnityPackages/LidgrenUdpNet/LidgrenUdpNet.dll",
15 | "Assets/UnityPackages/LidgrenUdpNet/LidgrenUdpNet.dll.mdb"
16 | ]
17 | }
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager/UiDialog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | public class UiDialog : MonoBehaviour
5 | {
6 | public virtual void OnShow(object param)
7 | {
8 | }
9 |
10 | public virtual void OnHide()
11 | {
12 | }
13 |
14 | public void Hide(object returnValue = null)
15 | {
16 | UiManager.Instance.HideModal(this, returnValue);
17 | }
18 |
19 | public void OnDialogCloseButtonClick()
20 | {
21 | Hide();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Domain/Interface/IGame.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Akka.Interfaced;
4 |
5 | namespace Domain
6 | {
7 | public class CreateGameParam
8 | {
9 | public bool WithBot;
10 | }
11 |
12 | public interface IGame : IInterfacedActor
13 | {
14 | Task> Join(long userId, string userName,
15 | IGameObserver observer, IGameUserObserver observerForUserActor);
16 | Task Leave(long userId);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI/Font/FontAwesome.otf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5fded8c9beb0efb42a6ba78ffb8ace9b
3 | timeCreated: 1445948494
4 | licenseType: Pro
5 | TrueTypeFontImporter:
6 | serializedVersion: 2
7 | fontSize: 16
8 | forceTextureCase: -2
9 | characterSpacing: 1
10 | characterPadding: 0
11 | includeFontData: 1
12 | use2xBehaviour: 0
13 | fontNames: []
14 | fallbackFontReferences: []
15 | customCharacters:
16 | fontRenderingMode: 0
17 | userData:
18 | assetBundleName:
19 | assetBundleVariant:
20 |
--------------------------------------------------------------------------------
/src/GameServer/ClusterNodeContext.cs:
--------------------------------------------------------------------------------
1 | using Aim.ClusterNode;
2 | using Akka.Cluster.Utility;
3 | using Domain;
4 |
5 | namespace GameServer
6 | {
7 | public class ClusterNodeContext : ClusterNodeContextBase
8 | {
9 | [ClusterActor("User")]
10 | public DistributedActorTableRef UserTable;
11 |
12 | [ClusterActor("Game")]
13 | public DistributedActorTableRef GameTable;
14 |
15 | [ClusterActor(nameof(IGamePairMaker))]
16 | public GamePairMakerRef GamePairMaker;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Domain/Interface/IGameObserver.cs:
--------------------------------------------------------------------------------
1 | using Akka.Interfaced;
2 | using Domain;
3 |
4 | namespace Domain
5 | {
6 | public interface IGameObserver : IInterfacedObserver
7 | {
8 | void Join(int playerId, long userId, string userName);
9 | void Leave(int playerId);
10 | void Begin(int currentPlayerId);
11 | void MakeMove(int playerId, PlacePosition pos, int nextTurnPlayerId);
12 | void Say(int playerId, string msg);
13 | void End(int winnerPlayerId);
14 | void Abort();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI/Font/OpenSans-Regular.ttf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 73e23e58d71f4974c8027187073263dc
3 | timeCreated: 1445950650
4 | licenseType: Pro
5 | TrueTypeFontImporter:
6 | serializedVersion: 2
7 | fontSize: 16
8 | forceTextureCase: -2
9 | characterSpacing: 1
10 | characterPadding: 0
11 | includeFontData: 1
12 | use2xBehaviour: 0
13 | fontNames: []
14 | fallbackFontReferences: []
15 | customCharacters:
16 | fontRenderingMode: 0
17 | userData:
18 | assetBundleName:
19 | assetBundleVariant:
20 |
--------------------------------------------------------------------------------
/src/Domain/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/Domain.Tests/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 3
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_WebSecurityEmulationEnabled: 0
10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d
11 | m_DefaultBehaviorMode: 1
12 | m_SpritePackerMode: 2
13 | m_SpritePackerPaddingPower: 1
14 | m_ProjectGenerationIncludedExtensions:
15 | m_ProjectGenerationRootNamespace:
16 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/JsonNet/Newtonsoft.Json.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 878a269ee50954f5843ce9e2d98a44a6
3 | PluginImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | isPreloaded: 0
8 | platformData:
9 | Any:
10 | enabled: 1
11 | settings: {}
12 | Editor:
13 | enabled: 0
14 | settings:
15 | DefaultValueInitialized: true
16 | WindowsStoreApps:
17 | enabled: 0
18 | settings:
19 | CPU: AnyCPU
20 | userData:
21 | assetBundleName:
22 | assetBundleVariant:
23 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/protobuf-net/protobuf-net.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3536e94788525ec2a98d33a025099d13
3 | PluginImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | isPreloaded: 0
8 | platformData:
9 | Any:
10 | enabled: 1
11 | settings: {}
12 | Editor:
13 | enabled: 0
14 | settings:
15 | DefaultValueInitialized: true
16 | WindowsStoreApps:
17 | enabled: 0
18 | settings:
19 | CPU: AnyCPU
20 | userData:
21 | assetBundleName:
22 | assetBundleVariant:
23 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c5a9de3f6ef750539bfceff9e76983fa
3 | PluginImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | isPreloaded: 0
8 | platformData:
9 | Any:
10 | enabled: 1
11 | settings: {}
12 | Editor:
13 | enabled: 0
14 | settings:
15 | DefaultValueInitialized: true
16 | WindowsStoreApps:
17 | enabled: 0
18 | settings:
19 | CPU: AnyCPU
20 | userData:
21 | assetBundleName:
22 | assetBundleVariant:
23 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfaced/Akka.Interfaced-Base.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 30eadbcb9c5c5a00a38e1dd5a021f365
3 | PluginImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | isPreloaded: 0
8 | platformData:
9 | Any:
10 | enabled: 1
11 | settings: {}
12 | Editor:
13 | enabled: 0
14 | settings:
15 | DefaultValueInitialized: true
16 | WindowsStoreApps:
17 | enabled: 0
18 | settings:
19 | CPU: AnyCPU
20 | userData:
21 | assetBundleName:
22 | assetBundleVariant:
23 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.Json.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: efaf957ceea15996b19d3c26c8b348a1
3 | PluginImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | isPreloaded: 0
8 | platformData:
9 | Any:
10 | enabled: 1
11 | settings: {}
12 | Editor:
13 | enabled: 0
14 | settings:
15 | DefaultValueInitialized: true
16 | WindowsStoreApps:
17 | enabled: 0
18 | settings:
19 | CPU: AnyCPU
20 | userData:
21 | assetBundleName:
22 | assetBundleVariant:
23 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData/TrackableData.Protobuf.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d18e4f37368c56068456c004e7528cdb
3 | PluginImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | isPreloaded: 0
8 | platformData:
9 | Any:
10 | enabled: 1
11 | settings: {}
12 | Editor:
13 | enabled: 0
14 | settings:
15 | DefaultValueInitialized: true
16 | WindowsStoreApps:
17 | enabled: 0
18 | settings:
19 | CPU: AnyCPU
20 | userData:
21 | assetBundleName:
22 | assetBundleVariant:
23 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/Akka.Interfaced.SlimSocket.Base.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 00bc6c5829e65129a15e59a15a26ae93
3 | PluginImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | isPreloaded: 0
8 | platformData:
9 | Any:
10 | enabled: 1
11 | settings: {}
12 | Editor:
13 | enabled: 0
14 | settings:
15 | DefaultValueInitialized: true
16 | WindowsStoreApps:
17 | enabled: 0
18 | settings:
19 | CPU: AnyCPU
20 | userData:
21 | assetBundleName:
22 | assetBundleVariant:
23 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Domain.Unity3D.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a6715fba3f1ffcb49b1ad217326a185a
3 | timeCreated: 1447077799
4 | licenseType: Pro
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Any:
12 | enabled: 1
13 | settings: {}
14 | Editor:
15 | enabled: 0
16 | settings:
17 | DefaultValueInitialized: true
18 | WindowsStoreApps:
19 | enabled: 0
20 | settings:
21 | CPU: AnyCPU
22 | userData:
23 | assetBundleName:
24 | assetBundleVariant:
25 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/Akka.Interfaced.SlimSocket.Client.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 95650fd08d60545ca713d27bacb044c5
3 | PluginImporter:
4 | serializedVersion: 1
5 | iconMap: {}
6 | executionOrder: {}
7 | isPreloaded: 0
8 | platformData:
9 | Any:
10 | enabled: 1
11 | settings: {}
12 | Editor:
13 | enabled: 0
14 | settings:
15 | DefaultValueInitialized: true
16 | WindowsStoreApps:
17 | enabled: 0
18 | settings:
19 | CPU: AnyCPU
20 | userData:
21 | assetBundleName:
22 | assetBundleVariant:
23 |
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6e38ac6b1c3556b4c888ca8552375e1e
3 | timeCreated: 1468300902
4 | licenseType: Pro
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Any:
12 | enabled: 1
13 | settings: {}
14 | Editor:
15 | enabled: 0
16 | settings:
17 | DefaultValueInitialized: true
18 | WindowsStoreApps:
19 | enabled: 0
20 | settings:
21 | CPU: AnyCPU
22 | userData:
23 | assetBundleName:
24 | assetBundleVariant:
25 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween43.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8bfe8067e80e150428b94d4b0bdd6a1a
3 | timeCreated: 1468300927
4 | licenseType: Pro
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Any:
12 | enabled: 1
13 | settings: {}
14 | Editor:
15 | enabled: 0
16 | settings:
17 | DefaultValueInitialized: true
18 | WindowsStoreApps:
19 | enabled: 0
20 | settings:
21 | CPU: AnyCPU
22 | userData:
23 | assetBundleName:
24 | assetBundleVariant:
25 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween46.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4d80efefbf640da428f1661832cb8757
3 | timeCreated: 1468300926
4 | licenseType: Pro
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Any:
12 | enabled: 1
13 | settings: {}
14 | Editor:
15 | enabled: 0
16 | settings:
17 | DefaultValueInitialized: true
18 | WindowsStoreApps:
19 | enabled: 0
20 | settings:
21 | CPU: AnyCPU
22 | userData:
23 | assetBundleName:
24 | assetBundleVariant:
25 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/DOTween50.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 17cb07a3a2ac5f64186dd6ad10060ca0
3 | timeCreated: 1468300924
4 | licenseType: Pro
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Any:
12 | enabled: 1
13 | settings: {}
14 | Editor:
15 | enabled: 0
16 | settings:
17 | DefaultValueInitialized: true
18 | WindowsStoreApps:
19 | enabled: 0
20 | settings:
21 | CPU: AnyCPU
22 | userData:
23 | assetBundleName:
24 | assetBundleVariant:
25 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Domain.Unity3D.ProtobufSerializer.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2ce30917c19384a4595d2a9df28c31a7
3 | timeCreated: 1447077798
4 | licenseType: Pro
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Any:
12 | enabled: 1
13 | settings: {}
14 | Editor:
15 | enabled: 0
16 | settings:
17 | DefaultValueInitialized: true
18 | WindowsStoreApps:
19 | enabled: 0
20 | settings:
21 | CPU: AnyCPU
22 | userData:
23 | assetBundleName:
24 | assetBundleVariant:
25 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/DOTweenEditor.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0d6555af380a7264a9cd5a9083b1c4ad
3 | timeCreated: 1468300899
4 | licenseType: Pro
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Any:
12 | enabled: 0
13 | settings: {}
14 | Editor:
15 | enabled: 1
16 | settings:
17 | DefaultValueInitialized: true
18 | WindowsStoreApps:
19 | enabled: 0
20 | settings:
21 | CPU: AnyCPU
22 | userData:
23 | assetBundleName:
24 | assetBundleVariant:
25 |
--------------------------------------------------------------------------------
/src/Domain/Data/IUserData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ProtoBuf;
3 | using TrackableData;
4 |
5 | namespace Domain
6 | {
7 | [ProtoContract]
8 | public interface IUserData : ITrackablePoco
9 | {
10 | [ProtoMember(1)] string Name { get; set; }
11 | [ProtoMember(2)] DateTime RegisterTime { get; set; }
12 | [ProtoMember(3)] DateTime LastLoginTime { get; set; }
13 | [ProtoMember(4)] int LoginCount { get; set; }
14 | [ProtoMember(5)] int PlayCount { get; set; }
15 | [ProtoMember(6)] int WinCount { get; set; }
16 | [ProtoMember(7)] int LoseCount { get; set; }
17 | [ProtoMember(8)] int DrawCount { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Base/UserEventProcessor.cs:
--------------------------------------------------------------------------------
1 | using Domain;
2 |
3 | public class UserEventProcessor : IUserEventObserver
4 | {
5 | private static UserEventProcessor s_instance;
6 |
7 | public static UserEventProcessor Instance
8 | {
9 | get
10 | {
11 | if (s_instance == null)
12 | s_instance = new UserEventProcessor();
13 | return s_instance;
14 | }
15 | }
16 |
17 | void IUserEventObserver.UserContextChange(TrackableUserContextTracker userContextTracker)
18 | {
19 | G.Logger.InfoFormat("UserContext: {0}", userContextTracker);
20 | userContextTracker.ApplyTo(G.UserContext);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/GameServer.Tests/MongoDbStorageFixture.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Configuration;
3 | using MongoDB.Driver;
4 |
5 | namespace GameServer.Tests
6 | {
7 | public class MongoDbStorageFixture : IDisposable
8 | {
9 | public MongoDbStorageFixture()
10 | {
11 | var cstr = ConfigurationManager.ConnectionStrings["Mongo"].ConnectionString;
12 | MongoDbStorage.Instance = new MongoDbStorage(cstr, "Test");
13 | MongoDbStorage.Instance.Client.DropDatabaseAsync(MongoDbStorage.Instance.DatabaseName).Wait();
14 | }
15 |
16 | public void Dispose()
17 | {
18 | MongoDbStorage.Instance = null;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/JsonNet.unitypackage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Id": "JsonNet",
3 | "Version": "9.0.1",
4 | "Authors": [
5 | "James Newton-King"
6 | ],
7 | "Owners": [
8 | "Esun Kim"
9 | ],
10 | "Description": "Unity3D port of Json.NET which is a popular high-performance JSON framework for .NET",
11 | "Files": [
12 | "Assets/UnityPackages/JsonNet/Newtonsoft.Json.dll",
13 | "Assets/UnityPackages/JsonNet/Newtonsoft.Json.dll.mdb",
14 | {
15 | "Target": "Assets/UnityPackages/JsonNetSample/JsonNetSample.cs",
16 | "Extra": true
17 | },
18 | {
19 | "Target": "Assets/UnityPackages/JsonNetSample/JsonNetSample.unity",
20 | "Extra": true
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_SolverIterationCount: 6
13 | m_QueriesHitTriggers: 1
14 | m_EnableAdaptiveForce: 0
15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
16 |
--------------------------------------------------------------------------------
/src/Domain/Interface/GameTypes.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using ProtoBuf;
3 |
4 | namespace Domain
5 | {
6 | public enum GameState
7 | {
8 | WaitingForPlayers,
9 | Playing,
10 | Ended,
11 | Aborted,
12 | }
13 |
14 | public enum GameResult
15 | {
16 | None,
17 | Win,
18 | Lose,
19 | Draw,
20 | }
21 |
22 | [ProtoContract]
23 | public class GameInfo
24 | {
25 | [ProtoMember(1)] public long Id;
26 | [ProtoMember(2)] public GameState State;
27 | [ProtoMember(3)] public List PlayerNames;
28 | [ProtoMember(4)] public int FirstMovePlayerId;
29 | [ProtoMember(5)] public List Positions;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Domain.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Utility/SpinRotator.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using UnityEngine;
3 |
4 | public class SpinRotator : MonoBehaviour
5 | {
6 | private RectTransform _transform;
7 | private int _curRotate;
8 |
9 | protected void Start()
10 | {
11 | _transform = GetComponent();
12 | }
13 |
14 | protected void OnEnable()
15 | {
16 | StartCoroutine(RotateCoroutine());
17 | }
18 |
19 | private IEnumerator RotateCoroutine()
20 | {
21 | while (true)
22 | {
23 | yield return new WaitForSeconds(0.1f);
24 | _curRotate = (_curRotate + 1) % 8;
25 | _transform.localRotation = Quaternion.Euler(0, 0, -_curRotate * 45f);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/UnityCommunicatorFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 | using Akka.Interfaced.SlimSocket;
4 | using Common.Logging;
5 | using ProtoBuf.Meta;
6 |
7 | namespace Akka.Interfaced.SlimSocket.Client
8 | {
9 | public static class UnityCommunicatorFactory
10 | {
11 | public static Communicator Create()
12 | {
13 | ChannelEventDispatcher.TryInit();
14 |
15 | var communicator = new Communicator();
16 | communicator.ChannelFactory.TaskFactory = new UnitySlimTaskFactory { Owner = ChannelEventDispatcher.Instance };
17 | ((ObserverRegistry)communicator.ObserverRegistry).EventPoster = c => ChannelEventDispatcher.Post(c, null);
18 |
19 | return communicator;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/NetLegacySupport.unitypackage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Id": "NetLegacySupport",
3 | "Version": "1.1.0",
4 | "Authors": [
5 | "Microsoft"
6 | ],
7 | "Owners": [
8 | "Esun Kim"
9 | ],
10 | "Description": "Action, Func, Tuple and ConcurrentDictionary for Unity3D. This is a backport from .NET Core.",
11 | "Files": [
12 | "Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Action.dll",
13 | "Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Action.dll.mdb",
14 | "Assets/UnityPackages/NetLegacySupport/NetLegacySupport.ConcurrentDictionary.dll",
15 | "Assets/UnityPackages/NetLegacySupport/NetLegacySupport.ConcurrentDictionary.dll.mdb",
16 | "Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Tuple.dll",
17 | "Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Tuple.dll.mdb"
18 | ]
19 | }
--------------------------------------------------------------------------------
/src/GameServer/Program.cs:
--------------------------------------------------------------------------------
1 | using Topshelf;
2 |
3 | namespace GameServer
4 | {
5 | internal class Program
6 | {
7 | private static int Main(string[] args)
8 | {
9 | return (int)HostFactory.Run(x =>
10 | {
11 | string runner = null;
12 | x.AddCommandLineDefinition("runner", val => runner = val);
13 |
14 | x.SetServiceName("TicTacToe");
15 | x.SetDisplayName("TicTacToe Service");
16 | x.SetDescription("TicTacToe Service using Akka.NET and Akka.Interfaced. (https://github.com/SaladLab/TicTacToe)");
17 |
18 | x.UseAssemblyInfoForServiceInfo();
19 | x.RunAsLocalSystem();
20 | x.StartAutomatically();
21 | x.Service(() => new GameService(runner));
22 | x.EnableServiceRecovery(r => r.RestartService(1));
23 | });
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/GameServer/MongoDbStorage.cs:
--------------------------------------------------------------------------------
1 | using Domain;
2 | using MongoDB.Bson;
3 | using MongoDB.Driver;
4 | using TrackableData.MongoDB;
5 |
6 | namespace GameServer
7 | {
8 | public class MongoDbStorage
9 | {
10 | public static MongoDbStorage Instance { get; set; }
11 |
12 | public MongoDbStorage(string connectionString, string databaseName = "TicTacToe")
13 | {
14 | Client = new MongoClient(connectionString);
15 | DatabaseName = databaseName;
16 | }
17 |
18 | public MongoClient Client { get; }
19 | public string DatabaseName { get; }
20 |
21 | public IMongoDatabase Database => Client.GetDatabase(DatabaseName);
22 | public IMongoCollection UserCollection => Database.GetCollection("User");
23 |
24 | public readonly static TrackableContainerMongoDbMapper UserContextMapper =
25 | new TrackableContainerMongoDbMapper();
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Utility/UnityCloudBuildManifest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | [Serializable]
5 | public class UnityCloudBuildManifest
6 | {
7 | #pragma warning disable SA1307 // Accessible fields must begin with upper-case letter
8 |
9 | public string scmCommitId;
10 | public string scmBranch;
11 | public string buildNumber;
12 | public string buildStartTime;
13 | public string projectId;
14 | public string bundleId;
15 | public string unityVersion;
16 | public string xcodeVersion;
17 | public string cloudBuildTargetName;
18 |
19 | #pragma warning restore SA1307 // Accessible fields must begin with upper-case letter
20 |
21 | public static UnityCloudBuildManifest Load()
22 | {
23 | var manifest = (TextAsset)Resources.Load("UnityCloudBuildManifest.json");
24 | if (manifest == null)
25 | return null;
26 |
27 | return JsonUtility.FromJson(manifest.text);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Base/G.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using Akka.Interfaced.SlimSocket.Client;
3 | using Common.Logging;
4 | using Domain;
5 |
6 | public static class G
7 | {
8 | static G()
9 | {
10 | _logger = LogManager.GetLogger("G");
11 | }
12 |
13 | // Communicator
14 |
15 | private static Communicator _communicator;
16 |
17 | public static Communicator Communicator
18 | {
19 | get { return _communicator; }
20 | set { _communicator = value; }
21 | }
22 |
23 | public static readonly IPEndPoint DefaultServerEndPoint = new IPEndPoint(IPAddress.Loopback, 9001);
24 |
25 | // Logger
26 |
27 | private static readonly ILog _logger;
28 |
29 | public static ILog Logger
30 | {
31 | get { return _logger; }
32 | }
33 |
34 | // User specific data
35 |
36 | public static UserRef User { get; set; }
37 |
38 | public static long UserId { get; set; }
39 |
40 | public static TrackableUserContext UserContext { get; set; }
41 | }
42 |
--------------------------------------------------------------------------------
/src/GameServer.Tests/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_MinPenetrationForPenalty: 0.01
17 | m_BaumgarteScale: 0.2
18 | m_BaumgarteTimeOfImpactScale: 0.75
19 | m_TimeToSleep: 0.5
20 | m_LinearSleepTolerance: 0.01
21 | m_AngularSleepTolerance: 2
22 | m_QueriesHitTriggers: 1
23 | m_QueriesStartInColliders: 1
24 | m_ChangeStopsCallbacks: 0
25 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Tic Tac Toe
2 |
3 | [](https://ci.appveyor.com/project/veblush/tictactoe)
4 | [](https://coveralls.io/github/SaladLab/TicTacToe?branch=master)
5 |
6 | Reference game for using Akka.Interfaced, Akka.Interfaced.SlimSocket and TrackableData.
7 |
8 | 
9 |
10 | ## How to run
11 |
12 | ### Prerequisites
13 |
14 | - MongoDB 3 or later
15 | - Visual Studio 2015 or later (it's not mandatory if you can build projects)
16 | - Unity 5.3 or later
17 |
18 | ### Steps
19 |
20 | - Make sure MongoDB is running well.
21 | - By default server connects to local MongoDB.
22 | - Address of MongoDB can be configured on src/GameServer/App.config.
23 | - Run Server
24 | - Open TicTacToe.sln with Visual Studio.
25 | - Run GameServer.
26 | - Run Client
27 | - Open src/GameClient with Unity
28 | - Open Scenes/MainScene and run.
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 SaladLab
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager/UiHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | public static class UiHelper
5 | {
6 | static public GameObject AddChild(GameObject parent, string name)
7 | {
8 | if (parent == null)
9 | throw new ArgumentNullException("parent");
10 |
11 | var go = new GameObject(name);
12 | go.layer = parent.layer;
13 |
14 | var tc = go.GetComponent();
15 | var tp = parent.GetComponent();
16 | tc.SetParent(tp, false);
17 |
18 | return go;
19 | }
20 |
21 | public static GameObject AddChild(GameObject parent, GameObject prefab)
22 | {
23 | if (parent == null)
24 | throw new ArgumentNullException("parent");
25 | if (prefab == null)
26 | throw new ArgumentNullException("prefab");
27 |
28 | var go = GameObject.Instantiate(prefab);
29 | go.layer = parent.layer;
30 |
31 | var tc = go.GetComponent();
32 | var tp = parent.GetComponent();
33 | tc.SetParent(tp, false);
34 |
35 | return go;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Domain.Unity3D/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Utility/Version.cs:
--------------------------------------------------------------------------------
1 | public static class Version
2 | {
3 | public static int MajorVersion { get; private set; }
4 | public static int MinorVersion { get; private set; }
5 | public static int BuildNumber { get; private set; }
6 |
7 | public static string CommitId { get; private set; }
8 |
9 | public static string VersionString
10 | {
11 | get { return string.Format("{0}.{1}.{2}", MajorVersion, MinorVersion, BuildNumber); }
12 | }
13 |
14 | static Version()
15 | {
16 | MajorVersion = 1;
17 | MinorVersion = 0;
18 | BuildNumber = 0;
19 | CommitId = "";
20 |
21 | TryToGetInformationFromUnityCloudBuildManifest();
22 | }
23 |
24 | private static void TryToGetInformationFromUnityCloudBuildManifest()
25 | {
26 | var manifest = UnityCloudBuildManifest.Load();
27 | if (manifest != null)
28 | {
29 | var buildNumber = 0;
30 | if (int.TryParse(manifest.buildNumber, out buildNumber))
31 | BuildNumber = buildNumber;
32 |
33 | CommitId = manifest.scmCommitId ?? "";
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CommonLogging.unitypackage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Id": "CommonLogging",
3 | "Version": "3.3.1",
4 | "Authors": [
5 | "Aleksandar Seovic",
6 | "Mark Pollack",
7 | "Erich Eichinger",
8 | "Stephen Bohlen"
9 | ],
10 | "Owners": [
11 | "Esun Kim"
12 | ],
13 | "Description": "Unity3D port of Common.Logging library which introduces a simple abstraction to allow you to select a specific logging implementation at runtime.",
14 | "Files": [
15 | "Assets/UnityPackages/CommonLogging/Common.Logging.Core.dll",
16 | "Assets/UnityPackages/CommonLogging/Common.Logging.Core.dll.mdb",
17 | "Assets/UnityPackages/CommonLogging/Common.Logging.dll",
18 | "Assets/UnityPackages/CommonLogging/Common.Logging.dll.mdb",
19 | "Assets/UnityPackages/CommonLogging/Common.Logging.Extensions.dll",
20 | "Assets/UnityPackages/CommonLogging/Common.Logging.Extensions.dll.mdb",
21 | {
22 | "Target": "Assets/UnityPackages/CommonLoggingSample/CommonLoggingSample.cs",
23 | "Extra": true
24 | },
25 | {
26 | "Target": "Assets/UnityPackages/CommonLoggingSample/CommonLoggingSample.unity",
27 | "Extra": true
28 | }
29 | ]
30 | }
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshAreas:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 |
--------------------------------------------------------------------------------
/src/Domain/Game/PlacePosition.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace Domain
4 | {
5 | [ProtoContract]
6 | public class PlacePosition
7 | {
8 | [ProtoMember(1)] public int X;
9 | [ProtoMember(2)] public int Y;
10 |
11 | public PlacePosition()
12 | : this(0, 0)
13 | {
14 | }
15 |
16 | public PlacePosition(int x, int y)
17 | {
18 | X = x;
19 | Y = y;
20 | }
21 |
22 | public override bool Equals(object obj)
23 | {
24 | if (obj == null)
25 | return false;
26 |
27 | var p = obj as PlacePosition;
28 | if (p == null)
29 | return false;
30 |
31 | return (X == p.X) && (Y == p.Y);
32 | }
33 |
34 | public bool Equals(PlacePosition p)
35 | {
36 | if (p == null)
37 | return false;
38 |
39 | return (X == p.X) && (Y == p.Y);
40 | }
41 |
42 | public override int GetHashCode()
43 | {
44 | return X ^ Y;
45 | }
46 |
47 | public override string ToString()
48 | {
49 | return string.Format("X={0} Y={1}", X, Y);
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # User-specific files
2 | *.suo
3 | *.user
4 | *.userosscache
5 | *.sln.docstates
6 |
7 | # Build results
8 | [Dd]ebug/
9 | [Dd]ebugPublic/
10 | [Rr]elease/
11 | [Rr]eleases/
12 | x64/
13 | x86/
14 | build/
15 | bld/
16 | [Bb]in/
17 | [Oo]bj/
18 |
19 | # Coverity output
20 | cov-int/
21 |
22 | # Visual Studio 2015 cache/options directory
23 | .vs/
24 |
25 | # DNX
26 | project.lock.json
27 | artifacts/
28 |
29 | # Visual Studio profiler
30 | *.psess
31 | *.vsp
32 | *.vspx
33 |
34 | # Visual Studio Code
35 | .vscode
36 |
37 | # Click-Once directory
38 | [Pp]ublish/
39 |
40 | # NuGet Packages
41 | *.nupkg
42 | # The packages folder can be ignored because of Package Restore
43 | **/packages/*
44 | # except build/, which is used as an MSBuild target.
45 | !**/packages/build/
46 | # Uncomment if necessary however generally it will be regenerated when needed
47 | #!**/packages/repositories.config
48 |
49 | # Windows Azure Build Output
50 | csx/
51 | *.build.csdef
52 |
53 | # Windows Store app package directory
54 | AppPackages/
55 |
56 | # Visual Studio cache files
57 | # files ending in .cache can be ignored
58 | *.[Cc]ache
59 | # but keep track of directories ending in .cache
60 | !*.[Cc]ache/
61 |
62 | # Fake
63 | .fake/
64 |
65 | # No APK
66 | *.apk
67 |
--------------------------------------------------------------------------------
/src/GameServer.Tests/AuthenticatorTest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 | using Xunit;
5 |
6 | namespace GameServer.Tests
7 | {
8 | public class AuthenticatorTest : IClassFixture
9 | {
10 | [Fact]
11 | public async Task Test_AuthenticateAsync_FirstCreate_Succeed()
12 | {
13 | var ret = await Authenticator.AuthenticateAsync("test", "1234");
14 | Assert.Equal("test", ret.Id);
15 | }
16 |
17 | [Fact]
18 | public async Task Test_AuthenticateAsync_SecondMatch_Succeed()
19 | {
20 | var ret = await Authenticator.AuthenticateAsync("test", "1234");
21 | var ret2 = await Authenticator.AuthenticateAsync("test", "1234");
22 | Assert.Equal("test", ret.Id);
23 | Assert.Equal("test", ret2.Id);
24 | }
25 |
26 | [Fact]
27 | public async Task Test_AuthenticateAsync_SecondUnmatch_Fail()
28 | {
29 | var ret = await Authenticator.AuthenticateAsync("test", "1234");
30 | var ret2 = await Authenticator.AuthenticateAsync("test", "123");
31 | Assert.Equal("test", ret.Id);
32 | Assert.Null(ret2);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/Domain/Interface/ResultException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ProtoBuf;
3 | using TypeAlias;
4 |
5 | namespace Domain
6 | {
7 | public enum ResultCodeType
8 | {
9 | None = 0,
10 | ArgumentError = 1,
11 | InternalError = 2,
12 | LoginCredentialError = 10,
13 | LoginAlreadyLoginedError,
14 | UserNeedToBeCreated = 20,
15 | NeedToBeInGame,
16 | NeedToBeOutOfGame,
17 | NotYourTurn,
18 | BadPosition,
19 | GameStarted,
20 | GamePlayerFull,
21 | GameNotFound,
22 | AlreadyPairingRegistered,
23 | }
24 |
25 | [ProtoContract, TypeAlias]
26 | public class ResultException : Exception
27 | {
28 | [ProtoMember(1)] public ResultCodeType ResultCode;
29 | [ProtoMember(2)] public string AdditionalMessage;
30 |
31 | public ResultException()
32 | {
33 | }
34 |
35 | public ResultException(ResultCodeType resultCode, string additionalMessage = null)
36 | {
37 | ResultCode = resultCode;
38 | AdditionalMessage = additionalMessage;
39 | }
40 |
41 | public override string ToString()
42 | {
43 | return string.Format("!{0}!", ResultCode);
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/Domain.Unity3D/Workaround/UnityIl2cppWorkaround.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using Domain;
4 | using TrackableData;
5 |
6 | namespace Domain
7 | {
8 | public class UnityIl2cppWorkaround
9 | {
10 | public static void Initialize()
11 | {
12 | if (DateTime.UtcNow.Year > 1)
13 | return;
14 |
15 | if (StubForTracker().Count(o => o == null) > 0)
16 | throw new Exception("Il2cppWorkaround got an error!");
17 | }
18 |
19 | /*
20 | Without this in IL2CPP, we can get this exception.
21 |
22 | MissingMethodException: Method not found:
23 | 'Default constructor not found...ctor() of TrackableData.TrackableDictionaryTracker`2[
24 | [System.Int32, mscorlib, Version=2.0.5.0, Culture=, PublicKeyToken=7cec85d7bea7798e],
25 | [System.String, mscorlib, Version=2.0.5.0, Culture=, PublicKeyToken=7cec85d7bea7798e]]'.
26 | */
27 |
28 | private static object[] StubForTracker()
29 | {
30 | return new object[]
31 | {
32 | new TrackablePocoTracker(),
33 | new TrackableDictionaryTracker(),
34 | };
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Domain/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UI/Icon/App.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d17b6ecc55f15b346b1eefac505f81c1
3 | timeCreated: 1450769731
4 | licenseType: Pro
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | serializedVersion: 2
8 | mipmaps:
9 | mipMapMode: 0
10 | enableMipMap: 1
11 | linearTexture: 0
12 | correctGamma: 0
13 | fadeOut: 0
14 | borderMipMap: 0
15 | mipMapFadeDistanceStart: 1
16 | mipMapFadeDistanceEnd: 3
17 | bumpmap:
18 | convertToNormalMap: 0
19 | externalNormalMap: 0
20 | heightScale: 0.25
21 | normalMapFilter: 0
22 | isReadable: 0
23 | grayScaleToAlpha: 0
24 | generateCubemap: 0
25 | cubemapConvolution: 0
26 | cubemapConvolutionSteps: 7
27 | cubemapConvolutionExponent: 1.5
28 | seamlessCubemap: 0
29 | textureFormat: -3
30 | maxTextureSize: 2048
31 | textureSettings:
32 | filterMode: -1
33 | aniso: 16
34 | mipBias: -1
35 | wrapMode: 1
36 | nPOTScale: 1
37 | lightmap: 0
38 | rGBM: 0
39 | compressionQuality: 50
40 | allowsAlphaSplitting: 0
41 | spriteMode: 0
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
47 | spritePixelsToUnits: 100
48 | alphaIsTransparency: 1
49 | textureType: 0
50 | buildTargetSettings: []
51 | spriteSheet:
52 | sprites: []
53 | outline: []
54 | spritePackingTag:
55 | userData:
56 | assetBundleName:
57 | assetBundleVariant:
58 |
--------------------------------------------------------------------------------
/src/GameClient/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_LegacyDeferred:
14 | m_Mode: 1
15 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
16 | m_AlwaysIncludedShaders:
17 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
18 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
19 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
20 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
21 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
22 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0}
23 | m_PreloadedShaders: []
24 | m_ShaderSettings:
25 | useScreenSpaceShadows: 1
26 | m_BuildTargetShaderSettings: []
27 | m_LightmapStripping: 0
28 | m_FogStripping: 0
29 | m_LightmapKeepPlain: 1
30 | m_LightmapKeepDirCombined: 1
31 | m_LightmapKeepDirSeparate: 1
32 | m_LightmapKeepDynamicPlain: 1
33 | m_LightmapKeepDynamicDirCombined: 1
34 | m_LightmapKeepDynamicDirSeparate: 1
35 | m_FogKeepLinear: 1
36 | m_FogKeepExp: 1
37 | m_FogKeepExp2: 1
38 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs/Footer.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0ce7b533e9764c141a068fadd859f9a6
3 | timeCreated: 1468300906
4 | licenseType: Pro
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | serializedVersion: 2
8 | mipmaps:
9 | mipMapMode: 0
10 | enableMipMap: 0
11 | linearTexture: 1
12 | correctGamma: 0
13 | fadeOut: 0
14 | borderMipMap: 0
15 | mipMapFadeDistanceStart: 1
16 | mipMapFadeDistanceEnd: 3
17 | bumpmap:
18 | convertToNormalMap: 0
19 | externalNormalMap: 0
20 | heightScale: 0.25
21 | normalMapFilter: 0
22 | isReadable: 0
23 | grayScaleToAlpha: 0
24 | generateCubemap: 0
25 | cubemapConvolution: 0
26 | cubemapConvolutionSteps: 7
27 | cubemapConvolutionExponent: 1.5
28 | seamlessCubemap: 0
29 | textureFormat: -3
30 | maxTextureSize: 256
31 | textureSettings:
32 | filterMode: 1
33 | aniso: 1
34 | mipBias: -1
35 | wrapMode: 1
36 | nPOTScale: 0
37 | lightmap: 0
38 | rGBM: 0
39 | compressionQuality: 50
40 | allowsAlphaSplitting: 0
41 | spriteMode: 0
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
47 | spritePixelsToUnits: 100
48 | alphaIsTransparency: 1
49 | textureType: 2
50 | buildTargetSettings: []
51 | spriteSheet:
52 | sprites: []
53 | outline: []
54 | spritePackingTag:
55 | userData:
56 | assetBundleName:
57 | assetBundleVariant:
58 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs/Header.jpg.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7741b4957200f0747a3c79d148de2402
3 | timeCreated: 1468300906
4 | licenseType: Pro
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | serializedVersion: 2
8 | mipmaps:
9 | mipMapMode: 0
10 | enableMipMap: 0
11 | linearTexture: 1
12 | correctGamma: 0
13 | fadeOut: 0
14 | borderMipMap: 0
15 | mipMapFadeDistanceStart: 1
16 | mipMapFadeDistanceEnd: 3
17 | bumpmap:
18 | convertToNormalMap: 0
19 | externalNormalMap: 0
20 | heightScale: 0.25
21 | normalMapFilter: 0
22 | isReadable: 0
23 | grayScaleToAlpha: 0
24 | generateCubemap: 0
25 | cubemapConvolution: 0
26 | cubemapConvolutionSteps: 7
27 | cubemapConvolutionExponent: 1.5
28 | seamlessCubemap: 0
29 | textureFormat: -3
30 | maxTextureSize: 512
31 | textureSettings:
32 | filterMode: 1
33 | aniso: 1
34 | mipBias: -1
35 | wrapMode: 1
36 | nPOTScale: 0
37 | lightmap: 0
38 | rGBM: 0
39 | compressionQuality: 50
40 | allowsAlphaSplitting: 0
41 | spriteMode: 0
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
47 | spritePixelsToUnits: 100
48 | alphaIsTransparency: 1
49 | textureType: 2
50 | buildTargetSettings: []
51 | spriteSheet:
52 | sprites: []
53 | outline: []
54 | spritePackingTag:
55 | userData:
56 | assetBundleName:
57 | assetBundleVariant:
58 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs/DOTweenIcon.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0d7e06117784ff44bacb9c9e551592b3
3 | timeCreated: 1468300906
4 | licenseType: Pro
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | serializedVersion: 2
8 | mipmaps:
9 | mipMapMode: 0
10 | enableMipMap: 1
11 | linearTexture: 0
12 | correctGamma: 0
13 | fadeOut: 0
14 | borderMipMap: 0
15 | mipMapFadeDistanceStart: 1
16 | mipMapFadeDistanceEnd: 3
17 | bumpmap:
18 | convertToNormalMap: 0
19 | externalNormalMap: 0
20 | heightScale: 0.25
21 | normalMapFilter: 0
22 | isReadable: 0
23 | grayScaleToAlpha: 0
24 | generateCubemap: 0
25 | cubemapConvolution: 0
26 | cubemapConvolutionSteps: 7
27 | cubemapConvolutionExponent: 1.5
28 | seamlessCubemap: 0
29 | textureFormat: -1
30 | maxTextureSize: 1024
31 | textureSettings:
32 | filterMode: -1
33 | aniso: -1
34 | mipBias: -1
35 | wrapMode: -1
36 | nPOTScale: 1
37 | lightmap: 0
38 | rGBM: 0
39 | compressionQuality: 50
40 | allowsAlphaSplitting: 0
41 | spriteMode: 0
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
47 | spritePixelsToUnits: 100
48 | alphaIsTransparency: 0
49 | textureType: -1
50 | buildTargetSettings: []
51 | spriteSheet:
52 | sprites: []
53 | outline: []
54 | spritePackingTag:
55 | userData:
56 | assetBundleName:
57 | assetBundleVariant:
58 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/Imgs/Footer_dark.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 073261fcf37d98645bac61b0e19ec84f
3 | timeCreated: 1468300906
4 | licenseType: Pro
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | serializedVersion: 2
8 | mipmaps:
9 | mipMapMode: 0
10 | enableMipMap: 1
11 | linearTexture: 0
12 | correctGamma: 0
13 | fadeOut: 0
14 | borderMipMap: 0
15 | mipMapFadeDistanceStart: 1
16 | mipMapFadeDistanceEnd: 3
17 | bumpmap:
18 | convertToNormalMap: 0
19 | externalNormalMap: 0
20 | heightScale: 0.25
21 | normalMapFilter: 0
22 | isReadable: 0
23 | grayScaleToAlpha: 0
24 | generateCubemap: 0
25 | cubemapConvolution: 0
26 | cubemapConvolutionSteps: 7
27 | cubemapConvolutionExponent: 1.5
28 | seamlessCubemap: 0
29 | textureFormat: -1
30 | maxTextureSize: 1024
31 | textureSettings:
32 | filterMode: -1
33 | aniso: -1
34 | mipBias: -1
35 | wrapMode: -1
36 | nPOTScale: 1
37 | lightmap: 0
38 | rGBM: 0
39 | compressionQuality: 50
40 | allowsAlphaSplitting: 0
41 | spriteMode: 0
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
47 | spritePixelsToUnits: 100
48 | alphaIsTransparency: 0
49 | textureType: -1
50 | buildTargetSettings: []
51 | spriteSheet:
52 | sprites: []
53 | outline: []
54 | spritePackingTag:
55 | userData:
56 | assetBundleName:
57 | assetBundleVariant:
58 |
--------------------------------------------------------------------------------
/src/Domain/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Common")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("SaladLab")]
12 | [assembly: AssemblyProduct("Common")]
13 | [assembly: AssemblyCopyright("Copyright © 2016 SaladLab")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("1c1828e1-af5d-4e0c-a439-aa31ac14c6d9")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/Domain.Unity3D/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Common")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("SaladLab")]
12 | [assembly: AssemblyProduct("Common")]
13 | [assembly: AssemblyCopyright("Copyright © 2016 SaladLab")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("1c1828e1-af5d-4e0c-a439-aa31ac14c6d9")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/GameServer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("GameServer")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("SaladLab")]
12 | [assembly: AssemblyProduct("GameServer")]
13 | [assembly: AssemblyCopyright("Copyright © 2016 SaladLab")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("fdeeb206-226b-4d6d-ab19-d36f8511880c")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/Domain.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Domain.Tests")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("SaladLab")]
12 | [assembly: AssemblyProduct("Domain.Tests")]
13 | [assembly: AssemblyCopyright("Copyright © 2016 SaladLab")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("2531f7ea-116a-43ea-8064-ed9d09ba43cc")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/GameServer.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("GameServer.Tests")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("SaladLab")]
12 | [assembly: AssemblyProduct("GameServer.Tests")]
13 | [assembly: AssemblyCopyright("Copyright © 2016 SaladLab")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("b60fc133-c45e-4e54-977f-db1457185224")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/GameServer.Tests/UserLoginActorTest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 | using System.Threading.Tasks;
4 | using Akka.Actor;
5 | using Akka.Interfaced.TestKit;
6 | using Akka.TestKit;
7 | using Akka.TestKit.Xunit2;
8 | using Domain;
9 | using Xunit;
10 |
11 | namespace GameServer.Tests
12 | {
13 | public class UserLoginActorTest : TestKit, IClassFixture, IClassFixture
14 | {
15 | private ClusterNodeContext _clusterContext;
16 | private MockClient _client;
17 |
18 | public UserLoginActorTest(ClusterContextFixture clusterContext)
19 | {
20 | clusterContext.Initialize(Sys);
21 | _clusterContext = clusterContext.Context;
22 | _client = new MockClient(_clusterContext);
23 | }
24 |
25 | [Fact]
26 | public async Task Test_UserLogin_NewUser_Succeed()
27 | {
28 | await _client.PrepareUserAsync("test", "1234", "CreatedUser");
29 | Assert.Equal("CreatedUser", _client.UserContext.Data.Name);
30 | }
31 |
32 | [Fact]
33 | public async Task Test_UserLogin_ExistingUser_Succeed()
34 | {
35 | await _client.PrepareUserAsync("test", "1234", "CreatedUser");
36 |
37 | _client.ChannelRef.WithNoReply().Close();
38 | await Task.Delay(100);
39 |
40 | _client = new MockClient(_clusterContext);
41 | await _client.PrepareUserAsync("test", "1234");
42 | Assert.Equal("CreatedUser", _client.UserContext.Data.Name);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TypeAlias.unitypackage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Id": "TypeAlias",
3 | "Version": "1.1.2",
4 | "Authors": [
5 | "Esun Kim"
6 | ],
7 | "Owners": [
8 | "Esun Kim"
9 | ],
10 | "Description": "Library that makes the unique alias of types in .NET.",
11 | "Dependencies": {
12 | "NetLegacySupport": {
13 | "Version": "1.*",
14 | "Source": "github:SaladLab/NetLegacySupport"
15 | }
16 | },
17 | "MergedDependencies": {
18 | "NetLegacySupport": {
19 | "Version": "1.1.0"
20 | }
21 | },
22 | "Files": [
23 | "Assets/UnityPackages/TypeAlias/TypeAlias.dll",
24 | "Assets/UnityPackages/TypeAlias/TypeAlias.dll.mdb",
25 | {
26 | "Target": "Assets/UnityPackages/NetLegacySupport.unitypackage.json",
27 | "Merged": true
28 | },
29 | {
30 | "Target": "Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Action.dll.mdb",
31 | "Merged": true
32 | },
33 | {
34 | "Target": "Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Action.dll",
35 | "Merged": true
36 | },
37 | {
38 | "Target": "Assets/UnityPackages/NetLegacySupport/NetLegacySupport.ConcurrentDictionary.dll.mdb",
39 | "Merged": true
40 | },
41 | {
42 | "Target": "Assets/UnityPackages/NetLegacySupport/NetLegacySupport.ConcurrentDictionary.dll",
43 | "Merged": true
44 | },
45 | {
46 | "Target": "Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Tuple.dll.mdb",
47 | "Merged": true
48 | },
49 | {
50 | "Target": "Assets/UnityPackages/NetLegacySupport/NetLegacySupport.Tuple.dll",
51 | "Merged": true
52 | }
53 | ]
54 | }
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/TrackableData.unitypackage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Id": "TrackableData",
3 | "Version": "1.2.0",
4 | "Authors": [
5 | "Esun Kim"
6 | ],
7 | "Owners": [
8 | "Esun Kim"
9 | ],
10 | "Description": "POCO, list, dictionary, set and container which can track changes. These changes can be saved or rollbacked or replayed to another object.",
11 | "Dependencies": {
12 | "JsonNet": {
13 | "Version": "9.*",
14 | "Source": "github:SaladLab/Json.Net.Unity3D"
15 | },
16 | "protobuf-net": {
17 | "Version": "2.1.0-alpha-1",
18 | "Source": "nuget:net30"
19 | }
20 | },
21 | "MergedDependencies": {
22 | "JsonNet": {
23 | "Version": "9.0.1"
24 | },
25 | "protobuf-net": {
26 | "Version": "2.1.0-alpha-1"
27 | }
28 | },
29 | "Files": [
30 | "Assets/UnityPackages/TrackableData/TrackableData.dll",
31 | "Assets/UnityPackages/TrackableData/TrackableData.dll.mdb",
32 | "Assets/UnityPackages/TrackableData/TrackableData.Json.dll",
33 | "Assets/UnityPackages/TrackableData/TrackableData.Json.dll.mdb",
34 | "Assets/UnityPackages/TrackableData/TrackableData.Protobuf.dll",
35 | "Assets/UnityPackages/TrackableData/TrackableData.Protobuf.dll.mdb",
36 | {
37 | "Target": "Assets/UnityPackages/JsonNet.unitypackage.json",
38 | "Merged": true
39 | },
40 | {
41 | "Target": "Assets/UnityPackages/protobuf-net.unitypackage.json",
42 | "Merged": true
43 | },
44 | {
45 | "Target": "Assets/UnityPackages/JsonNet/Newtonsoft.Json.dll.mdb",
46 | "Merged": true
47 | },
48 | {
49 | "Target": "Assets/UnityPackages/JsonNet/Newtonsoft.Json.dll",
50 | "Merged": true
51 | },
52 | {
53 | "Target": "Assets/UnityPackages/protobuf-net/protobuf-net.dll",
54 | "Merged": true
55 | }
56 | ]
57 | }
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/UserInfoDialogBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using Domain;
4 | using UnityEngine.UI;
5 |
6 | public class UserInfoDialogBox : UiDialog
7 | {
8 | public Text UserIdText;
9 | public Text UserStatText;
10 | public Text UserDataText;
11 |
12 | public class Argument
13 | {
14 | public IUserContext UserContext;
15 | }
16 |
17 | public override void OnShow(object param)
18 | {
19 | var arg = (Argument)param;
20 | var uc = arg.UserContext;
21 | UserIdText.text = uc.Data.Name;
22 | UserStatText.text = string.Format(
23 | "Win: {0} / Draw: {1} / Lose: {2}",
24 | uc.Data.WinCount, uc.Data.DrawCount, uc.Data.LoseCount);
25 | UserDataText.text = GetUserDataText(uc);
26 | }
27 |
28 | private string GetUserDataText(IUserContext uc)
29 | {
30 | var sb = new StringBuilder();
31 |
32 | var data = uc.Data;
33 | sb.AppendLine("Data");
34 | sb.AppendFormat("RegisterTime: {0}\n", data.RegisterTime);
35 | sb.AppendFormat("LastLoginTime: {0}\n", data.LastLoginTime);
36 | sb.AppendFormat("LoginCount: {0}\n", data.LoginCount);
37 | sb.AppendLine("");
38 |
39 | var achivements = uc.Achivements;
40 | sb.AppendLine("Achievement");
41 | foreach (AchievementKey key in Enum.GetValues(typeof(AchievementKey)))
42 | {
43 | UserAchievement ach;
44 | if (achivements.TryGetValue((int)key, out ach))
45 | {
46 | if (ach.AchieveTime.HasValue)
47 | sb.AppendFormat("{0}: Achieved({1})\n", key, ach.AchieveTime.Value);
48 | else
49 | sb.AppendFormat("{0}: Progress({1})\n", key, ach.Value);
50 | }
51 | }
52 | sb.AppendLine("");
53 |
54 | return sb.ToString();
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Game/GamePlayerPlate.cs:
--------------------------------------------------------------------------------
1 | using DG.Tweening;
2 | using UnityEngine;
3 | using UnityEngine.UI;
4 |
5 | public class GamePlayerPlate : MonoBehaviour
6 | {
7 | public RectTransform Grid;
8 | public Text GridText;
9 | public Text Name;
10 | public RectTransform Timer;
11 | public Text TimerValue;
12 |
13 | private Tween _timerTween;
14 |
15 | public void SetTurn(bool turn)
16 | {
17 | var image = GetComponent();
18 | image.color = new Color(1, 0, 0, turn ? 0.2f : 0.05f);
19 | }
20 |
21 | public void SetWin()
22 | {
23 | var image = GetComponent();
24 | image.color = new Color(1, 1, 0, 0.3f);
25 | }
26 |
27 | public void SetGrid(int value)
28 | {
29 | switch (value)
30 | {
31 | case 1:
32 | GridText.text = "\xf10c";
33 | GridText.color = Color.red;
34 | break;
35 |
36 | case 2:
37 | GridText.text = "\xf00d";
38 | GridText.color = Color.blue;
39 | break;
40 |
41 | default:
42 | GridText.text = "";
43 | GridText.color = Color.black;
44 | break;
45 | }
46 | }
47 |
48 | public void SetName(string text)
49 | {
50 | Name.text = text;
51 | }
52 |
53 | public void SetTimerOn(bool visible, int initialValue = 0)
54 | {
55 | Timer.gameObject.SetActive(visible);
56 |
57 | if (_timerTween != null)
58 | {
59 | _timerTween.Kill();
60 | _timerTween = null;
61 | }
62 |
63 | if (visible)
64 | {
65 | TimerValue.text = initialValue.ToString();
66 | _timerTween = DOTween.To(() => int.Parse(TimerValue.text),
67 | v => TimerValue.text = v.ToString(),
68 | 0, initialValue)
69 | .SetEase(Ease.Linear);
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/GridAnimation.cs:
--------------------------------------------------------------------------------
1 | using DG.Tweening;
2 | using UnityEngine;
3 | using UnityEngine.UI;
4 |
5 | public class GridAnimation : MonoBehaviour
6 | {
7 | public Text LetterTemplate;
8 |
9 | private Text[] _letters;
10 |
11 | protected void Start()
12 | {
13 | BuildLetters();
14 | StartAnimation();
15 | }
16 |
17 | private void BuildLetters()
18 | {
19 | var caption = "TICTACTOE";
20 | _letters = new Text[9];
21 | for (int y = 0; y < 3; y++)
22 | {
23 | for (int x = 0; x < 3; x++)
24 | {
25 | var index = (y * 3) + x;
26 | var text = (Text)Instantiate(LetterTemplate);
27 | text.transform.SetParent(LetterTemplate.transform.parent, false);
28 | text.transform.localPosition = new Vector3((x * 200) - 200, (y * -200) + 200, 0);
29 | text.text = caption[index].ToString();
30 | _letters[index] = text;
31 | }
32 | }
33 | LetterTemplate.gameObject.SetActive(false);
34 | }
35 |
36 | private void StartAnimation()
37 | {
38 | Debug.Log("StartAnimation");
39 | foreach (var letter in _letters)
40 | {
41 | var time = Random.Range(0f, 5f);
42 |
43 | var l = letter;
44 | var x = letter.text + "";
45 | var sequence = DOTween.Sequence()
46 | .AppendInterval(time)
47 | .Append(l.transform.DOShakePosition(1, 10, 20, 90))
48 | .AppendCallback(() => l.text = Random.Range(0, 2) == 0 ? "X" : "O")
49 | .AppendInterval(2)
50 | .Append(l.transform.DOShakePosition(1, 10, 20, 90))
51 | .AppendCallback(() => l.text = x)
52 | .AppendInterval(5 - time)
53 | .SetLoops(-1, LoopType.Restart);
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager.unitypackage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Id": "UiManager",
3 | "Version": "1.1.0",
4 | "Authors": [
5 | "Esun Kim"
6 | ],
7 | "Owners": [
8 | "Esun Kim"
9 | ],
10 | "Description": "Common UI Manager for Unity3D",
11 | "Dependencies": {
12 | "CommonLogging": {
13 | "Version": "3.*",
14 | "Source": "github:SaladLab/Common.Logging.Unity3D"
15 | }
16 | },
17 | "MergedDependencies": {
18 | "CommonLogging": {
19 | "Version": "3.3.1"
20 | }
21 | },
22 | "Files": [
23 | "Assets/UnityPackages/UiManager/UiDialog.cs",
24 | "Assets/UnityPackages/UiManager/UiDialogHandle.cs",
25 | "Assets/UnityPackages/UiManager/UiHelper.cs",
26 | "Assets/UnityPackages/UiManager/UiInputBox.cs",
27 | "Assets/UnityPackages/UiManager/UiManager.cs",
28 | "Assets/UnityPackages/UiManager/UiMessageBox.cs",
29 | {
30 | "Target": "Assets/UnityPackages/UiManagerSample/TestDialogBox.cs",
31 | "Extra": true
32 | },
33 | {
34 | "Target": "Assets/UnityPackages/UiManagerSample/UiManagerSample.cs",
35 | "Extra": true
36 | },
37 | {
38 | "Target": "Assets/UnityPackages/UiManagerSample/UiManagerSample.unity",
39 | "Extra": true
40 | },
41 | {
42 | "Target": "Assets/UnityPackages/CommonLogging.unitypackage.json",
43 | "Merged": true
44 | },
45 | {
46 | "Target": "Assets/UnityPackages/CommonLogging/Common.Logging.Core.dll.mdb",
47 | "Merged": true
48 | },
49 | {
50 | "Target": "Assets/UnityPackages/CommonLogging/Common.Logging.Core.dll",
51 | "Merged": true
52 | },
53 | {
54 | "Target": "Assets/UnityPackages/CommonLogging/Common.Logging.dll.mdb",
55 | "Merged": true
56 | },
57 | {
58 | "Target": "Assets/UnityPackages/CommonLogging/Common.Logging.dll",
59 | "Merged": true
60 | },
61 | {
62 | "Target": "Assets/UnityPackages/CommonLogging/Common.Logging.Extensions.dll.mdb",
63 | "Merged": true
64 | },
65 | {
66 | "Target": "Assets/UnityPackages/CommonLogging/Common.Logging.Extensions.dll",
67 | "Merged": true
68 | }
69 | ]
70 | }
--------------------------------------------------------------------------------
/src/Domain.Tests/LogicTest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using Domain;
4 | using Xunit;
5 |
6 | namespace Domain.Tests
7 | {
8 | public class LogicTest
9 | {
10 | private int[,] ParseBoard(string board)
11 | {
12 | var m = new int[Rule.BoardSize, Rule.BoardSize];
13 | var i = 0;
14 | for (int y = 0; y < Rule.BoardSize; y++)
15 | {
16 | for (int x = 0; x < Rule.BoardSize; x++)
17 | {
18 | var c = board[i++];
19 | m[x, y] = (c - '0');
20 | }
21 | }
22 | return m;
23 | }
24 |
25 | [Fact]
26 | public void Test_FindMatchedRow_FindRow()
27 | {
28 | var m = ParseBoard("021" +
29 | "221" +
30 | "011");
31 |
32 | var r = Logic.FindMatchedRow(m);
33 |
34 | Assert.Equal(new[] { 1, 1, 1 }, Logic.RowPositions[r.Item1].Select(p => m[p.X, p.Y]).ToArray());
35 | Assert.Equal(1, r.Item2);
36 | }
37 |
38 | [Fact]
39 | public void Test_FindMatchedRow_FindNoRow()
40 | {
41 | var m = ParseBoard("021" +
42 | "221" +
43 | "012");
44 |
45 | var r = Logic.FindMatchedRow(m);
46 |
47 | Assert.Equal(null, r);
48 | }
49 |
50 | [Fact]
51 | public void Test_DetermineMove_FirstRule()
52 | {
53 | var m = ParseBoard("001" +
54 | "001" +
55 | "000");
56 |
57 | var r = Logic.DetermineMove(m, 1);
58 |
59 | Assert.Equal(new PlacePosition(2, 2), r);
60 | }
61 |
62 | [Fact]
63 | public void Test_DetermineMove_SecondRule()
64 | {
65 | var m = ParseBoard("001" +
66 | "001" +
67 | "000");
68 |
69 | var r = Logic.DetermineMove(m, 2);
70 |
71 | Assert.Equal(new PlacePosition(2, 2), r);
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/link.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/ChannelEventDispatcher.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Threading;
4 | using UnityEngine;
5 |
6 | namespace Akka.Interfaced.SlimSocket.Client
7 | {
8 | public class ChannelEventDispatcher : MonoBehaviour
9 | {
10 | private static ChannelEventDispatcher s_instance;
11 | private static bool s_instanceExists;
12 |
13 | private static readonly List> s_posts =
14 | new List>();
15 |
16 | public static ChannelEventDispatcher Instance
17 | {
18 | get { return s_instance; }
19 | }
20 |
21 | public static bool TryInit()
22 | {
23 | if (s_instanceExists)
24 | return false;
25 |
26 | s_instanceExists = true;
27 |
28 | var go = new GameObject("_ChannelEventDispatcher");
29 | s_instance = go.AddComponent();
30 | DontDestroyOnLoad(go);
31 | return true;
32 | }
33 |
34 | public static void Post(SendOrPostCallback callback, object state = null)
35 | {
36 | lock (s_posts)
37 | {
38 | s_posts.Add(Tuple.Create(callback, state));
39 | }
40 | }
41 |
42 | private void Awake()
43 | {
44 | if (s_instance)
45 | {
46 | DestroyImmediate(this);
47 | }
48 | else
49 | {
50 | s_instance = this;
51 | s_instanceExists = true;
52 | }
53 | }
54 |
55 | private void OnDestroy()
56 | {
57 | if (s_instance == this)
58 | {
59 | s_instance = null;
60 | s_instanceExists = false;
61 | }
62 | }
63 |
64 | private void Update()
65 | {
66 | lock (s_posts)
67 | {
68 | foreach (var post in s_posts)
69 | {
70 | post.Item1(post.Item2);
71 | }
72 | s_posts.Clear();
73 | }
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/GameServer/GameService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Configuration;
3 | using Aim.ClusterNode;
4 | using Akka.Configuration.Hocon;
5 | using Common.Logging;
6 | using Domain;
7 | using Topshelf;
8 |
9 | namespace GameServer
10 | {
11 | public class GameService : ServiceControl
12 | {
13 | private ILog _log = LogManager.GetLogger("GameService");
14 | private ClusterRunner _clusterRunner;
15 | private string _runner;
16 |
17 | public GameService(string runner)
18 | {
19 | _runner = runner;
20 | }
21 |
22 | bool ServiceControl.Start(HostControl hostControl)
23 | {
24 | // force interface assembly to be loaded before creating ProtobufSerializer
25 |
26 | var type = typeof(IUser);
27 | if (type == null)
28 | throw new InvalidProgramException("!");
29 |
30 | // connect to mongo-db
31 |
32 | try
33 | {
34 | var cstr = ConfigurationManager.ConnectionStrings["Mongo"].ConnectionString;
35 | MongoDbStorage.Instance = new MongoDbStorage(cstr);
36 | }
37 | catch (Exception e)
38 | {
39 | _log.Error("MongoDB connection error", e);
40 | return false;
41 | }
42 |
43 | // run cluster nodes
44 |
45 | var section = (AkkaConfigurationSection)ConfigurationManager.GetSection("akka");
46 | var config = section.AkkaConfig;
47 | var runner = new ClusterRunner(config, new[] { GetType().Assembly });
48 | runner.CreateClusterNodeContext = () => new ClusterNodeContext();
49 |
50 | var runnerConfig = config.GetValue("system.runner").GetObject();
51 | var nodes = runnerConfig.GetKey(_runner ?? "default");
52 | if (nodes == null)
53 | {
54 | _log.Error("Cannot find runner:" + _runner);
55 | return false;
56 | }
57 |
58 | runner.Launch(nodes.GetArray()).Wait();
59 | _clusterRunner = runner;
60 |
61 | return true;
62 | }
63 |
64 | bool ServiceControl.Stop(HostControl hostControl)
65 | {
66 | _log.Info("Stop");
67 |
68 | if (_clusterRunner != null)
69 | {
70 | _clusterRunner.Shutdown().Wait();
71 | _clusterRunner = null;
72 | }
73 | return true;
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager/UiInputBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 | using UnityEngine.UI;
4 |
5 | public class UiInputBox : UiDialog
6 | {
7 | public delegate void InputResultDelegate(string input);
8 |
9 | public enum ButtonType
10 | {
11 | Ok,
12 | OkCancel,
13 | }
14 |
15 | public Text MessageText;
16 | public InputField ValueInput;
17 | public Button[] Buttons;
18 |
19 | public static UiDialogHandle Show(
20 | string msg, string value = null, ButtonType buttonType = ButtonType.Ok,
21 | InputResultDelegate callback = null, string customOkName = null)
22 | {
23 | UiDialogHandle handle;
24 | {
25 | var builtin = UiManager.Instance.FindFromDialogRoot("InputBox");
26 | if (builtin != null)
27 | {
28 | handle = UiManager.Instance.ShowModalTemplate(builtin.gameObject);
29 | }
30 | else
31 | {
32 | var msgBoxPrefab = Resources.Load("InputBox") as GameObject;
33 | handle = UiManager.Instance.ShowModalPrefab(msgBoxPrefab);
34 | }
35 | }
36 |
37 | if (callback != null)
38 | handle.Hidden += (dlg, returnValue) => callback((string)returnValue);
39 |
40 | var msgBox = (UiInputBox)handle.Dialog;
41 | msgBox.MessageText.text = msg;
42 | msgBox.ValueInput.text = value ?? "";
43 |
44 | var b0 = msgBox.Buttons[0];
45 | var b0Text = b0.transform.Find("Text").GetComponent();
46 | var b1 = msgBox.Buttons[1];
47 | var b1Text = b1.transform.Find("Text").GetComponent();
48 |
49 | b1.gameObject.SetActive(buttonType != ButtonType.Ok);
50 |
51 | switch (buttonType)
52 | {
53 | case ButtonType.Ok:
54 | b0Text.text = customOkName ?? "Ok";
55 | b0.onClick.AddListener(() => msgBox.OnButtonClick(true));
56 | break;
57 |
58 | case ButtonType.OkCancel:
59 | b0Text.text = customOkName ?? "Ok";
60 | b0.onClick.AddListener(() => msgBox.OnButtonClick(true));
61 | b1Text.text = "Cancel";
62 | b1.onClick.AddListener(() => msgBox.OnButtonClick(false));
63 | break;
64 | }
65 |
66 | return handle;
67 | }
68 |
69 | private void OnButtonClick(bool ok)
70 | {
71 | Hide(ok ? ValueInput.text : null);
72 | }
73 |
74 | public void OnInputSubmit()
75 | {
76 | OnButtonClick(true);
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/src/GameServer.Tests/ClusterContextFixture.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Akka.Actor;
3 | using Akka.Interfaced;
4 | using Akka.Cluster.Utility;
5 | using Domain;
6 |
7 | namespace GameServer.Tests
8 | {
9 | public class ClusterContextFixture : IDisposable
10 | {
11 | public ClusterNodeContext Context { get; private set; }
12 |
13 | public ClusterContextFixture()
14 | {
15 | // force interface assembly to be loaded before creating ProtobufSerializer
16 |
17 | var type = typeof(IUser);
18 | if (type == null)
19 | throw new InvalidProgramException("!");
20 | }
21 |
22 | public void Initialize(ActorSystem system)
23 | {
24 | var context = new ClusterNodeContext { System = system };
25 |
26 | context.ClusterActorDiscovery = system.ActorOf(
27 | Props.Create(() => new ClusterActorDiscovery(null)));
28 |
29 | context.UserTable = new DistributedActorTableRef(system.ActorOf(
30 | Props.Create(() => new DistributedActorTable(
31 | "User", context.ClusterActorDiscovery, null, null)),
32 | "UserTable"));
33 |
34 | var userTableContainer = system.ActorOf(
35 | Props.Create(() => new DistributedActorTableContainer(
36 | "User", context.ClusterActorDiscovery, typeof(UserActorFactory), new object[] { context }, InterfacedPoisonPill.Instance)),
37 | "UserTableContainer");
38 |
39 | context.GameTable = new DistributedActorTableRef(system.ActorOf(
40 | Props.Create(() => new DistributedActorTable(
41 | "Game", context.ClusterActorDiscovery, typeof(IncrementalIntegerIdGenerator), null)),
42 | "GameTable"));
43 |
44 | var gameTableContainer = system.ActorOf(
45 | Props.Create(() => new DistributedActorTableContainer(
46 | "Game", context.ClusterActorDiscovery, typeof(GameActorFactory), new object[] { context }, InterfacedPoisonPill.Instance)),
47 | "GameTableContainer");
48 |
49 | var gamePairMaker = system.ActorOf(Props.Create(() => new GamePairMakerActor(context)));
50 | context.GamePairMaker = gamePairMaker.Cast();
51 |
52 | Context = context;
53 | }
54 |
55 | public void Dispose()
56 | {
57 | if (Context == null)
58 | return;
59 |
60 | Context.System.Terminate();
61 | Context = null;
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/GameServer/UserLoginActor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 | using System.Threading.Tasks;
4 | using Akka.Actor;
5 | using Akka.Interfaced;
6 | using Akka.Interfaced.LogFilter;
7 | using Akka.Interfaced.SlimServer;
8 | using Common.Logging;
9 | using Domain;
10 |
11 | namespace GameServer
12 | {
13 | [Log]
14 | [ResponsiveException(typeof(ResultException))]
15 | public class UserLoginActor : InterfacedActor, IUserLogin
16 | {
17 | private readonly ILog _logger;
18 | private readonly ClusterNodeContext _clusterContext;
19 | private readonly ActorBoundChannelRef _channel;
20 |
21 | public UserLoginActor(ClusterNodeContext clusterContext, ActorBoundChannelRef channel, EndPoint clientRemoteEndPoint)
22 | {
23 | _logger = LogManager.GetLogger($"UserLoginActor({clientRemoteEndPoint})");
24 | _clusterContext = clusterContext;
25 | _channel = channel;
26 | }
27 |
28 | async Task> IUserLogin.Login(string id, string password)
29 | {
30 | if (id == null)
31 | throw new ResultException(ResultCodeType.ArgumentError, nameof(id));
32 | if (password == null)
33 | throw new ResultException(ResultCodeType.ArgumentError, nameof(password));
34 |
35 | // verify crendential
36 | var account = await Authenticator.AuthenticateAsync(id, password);
37 | if (account == null)
38 | throw new ResultException(ResultCodeType.LoginCredentialError);
39 |
40 | // try to create user actor with user-id
41 | var user = await _clusterContext.UserTable.WithTimeout(TimeSpan.FromSeconds(30)).GetOrCreate(account.UserId, null);
42 | if (user.Actor == null)
43 | throw new ResultException(ResultCodeType.InternalError);
44 | if (user.Created == false)
45 | throw new ResultException(ResultCodeType.LoginAlreadyLoginedError);
46 |
47 | // bound actor to this channel or new channel on user gateway
48 | IRequestTarget boundTarget;
49 | try
50 | {
51 | boundTarget = await _channel.BindActorOrOpenChannel(
52 | user.Actor, new TaggedType[] { typeof(IUserInitiator) },
53 | ActorBindingFlags.OpenThenNotification | ActorBindingFlags.CloseThenStop | ActorBindingFlags.StopThenCloseChannel,
54 | "UserGateway", null);
55 | }
56 | catch (Exception e)
57 | {
58 | _logger.Error($"BindActorOrOpenChannel error (UserId={account.UserId})", e);
59 | user.Actor.Tell(InterfacedPoisonPill.Instance);
60 | throw new ResultException(ResultCodeType.InternalError);
61 | }
62 |
63 | // once login done, stop this
64 | Self.Tell(InterfacedPoisonPill.Instance);
65 |
66 | return Tuple.Create(account.UserId, (IUserInitiator)boundTarget.Cast());
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/src/GameServer.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/src/Domain/Data/UserAchievement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ProtoBuf;
3 | using TrackableData;
4 |
5 | namespace Domain
6 | {
7 | public enum AchievementKey
8 | {
9 | FirstPlay = 1,
10 | FirstWin = 2,
11 | FirstLose = 3,
12 | FirstDraw = 4,
13 | Play10Times = 11,
14 | Win10Times = 12,
15 | Lose10Times = 13,
16 | Draw10Times = 14,
17 | }
18 |
19 | [ProtoContract]
20 | public class UserAchievement
21 | {
22 | [ProtoMember(1)] public DateTime? AchieveTime { get; set; }
23 | [ProtoMember(2)] public int Value { get; set; }
24 |
25 | public override string ToString()
26 | {
27 | if (AchieveTime.HasValue && Value != 0)
28 | return $"Achieved({AchieveTime}), Value({Value})";
29 | if (AchieveTime.HasValue)
30 | return $"Achieved({AchieveTime})";
31 | if (Value != 0)
32 | return $"Value({Value})";
33 | return string.Empty;
34 | }
35 | }
36 |
37 | public static class UserAchievementDictionaryExtensions
38 | {
39 | public static bool IsAchieved(this TrackableDictionary dict,
40 | AchievementKey key)
41 | {
42 | UserAchievement ach;
43 | return dict.TryGetValue((int)key, out ach) && ach.AchieveTime.HasValue;
44 | }
45 |
46 | public static bool TryAchieved(this TrackableDictionary dict,
47 | AchievementKey key)
48 | {
49 | UserAchievement ach;
50 | if (dict.TryGetValue((int)key, out ach))
51 | {
52 | if (ach.AchieveTime.HasValue)
53 | return false;
54 |
55 | ach = new UserAchievement { AchieveTime = DateTime.UtcNow, Value = ach.Value };
56 | dict[(int)key] = ach;
57 | }
58 | else
59 | {
60 | ach = new UserAchievement { AchieveTime = DateTime.UtcNow };
61 | dict.Add((int)key, ach);
62 | }
63 | return true;
64 | }
65 |
66 | public static int? TryProgress(this TrackableDictionary dict,
67 | AchievementKey key, int increment)
68 | {
69 | UserAchievement ach;
70 | if (dict.TryGetValue((int)key, out ach))
71 | {
72 | if (ach.AchieveTime.HasValue)
73 | return null;
74 |
75 | ach = new UserAchievement { Value = ach.Value + increment };
76 | dict[(int)key] = ach;
77 | }
78 | else
79 | {
80 | ach = new UserAchievement { Value = increment };
81 | dict.Add((int)key, ach);
82 | }
83 | return ach.Value;
84 | }
85 |
86 | public static bool TryProgress(this TrackableDictionary dict,
87 | AchievementKey key, int increment, int goal)
88 | {
89 | var value = TryProgress(dict, key, increment);
90 | if (value == null || value < goal)
91 | return false;
92 |
93 | return TryAchieved(dict, key);
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/DOTween/Editor/DOTweenEditor.XML:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOTweenEditor
5 |
6 |
7 |
8 |
9 | Checks that the given editor texture use the correct import settings,
10 | and applies them if they're incorrect.
11 |
12 |
13 |
14 |
15 | Returns TRUE if addons setup is required.
16 |
17 |
18 |
19 |
20 | Returns TRUE if the file/directory at the given path exists.
21 |
22 | Path, relative to Unity's project folder
23 |
24 |
25 |
26 |
27 | Converts the given project-relative path to a full path,
28 | with backward (\) slashes).
29 |
30 |
31 |
32 |
33 | Converts the given full path to a path usable with AssetDatabase methods
34 | (relative to Unity's project folder, and with the correct Unity forward (/) slashes).
35 |
36 |
37 |
38 |
39 | Connects to a asset.
40 | If the asset already exists at the given path, loads it and returns it.
41 | Otherwise, either returns NULL or automatically creates it before loading and returning it
42 | (depending on the given parameters).
43 |
44 | Asset type
45 | File path (relative to Unity's project folder)
46 | If TRUE and the requested asset doesn't exist, forces its creation
47 |
48 |
49 |
50 | Full path for the given loaded assembly, assembly file included
51 |
52 |
53 |
54 |
55 | Not used as menu item anymore, but as a utiity function
56 |
57 |
58 |
59 |
60 | Setups DOTween
61 |
62 | If TRUE, no warning window appears in case there is no need for setup
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/Scripts/Game/GameBoard.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using DG.Tweening;
3 | using Domain;
4 | using UnityEngine;
5 | using UnityEngine.EventSystems;
6 | using UnityEngine.UI;
7 |
8 | public class GameBoard : MonoBehaviour
9 | {
10 | public RectTransform GridTemplate;
11 |
12 | public Action GridClicked;
13 |
14 | private int[,] _gridMarks = new int[Rule.BoardSize, Rule.BoardSize];
15 | private RectTransform[,] _gridRects = new RectTransform[Rule.BoardSize, Rule.BoardSize];
16 |
17 | private void Start()
18 | {
19 | BuildGrids();
20 | }
21 |
22 | private void BuildGrids()
23 | {
24 | for (int y = 0; y < Rule.BoardSize; y++)
25 | {
26 | for (int x = 0; x < Rule.BoardSize; x++)
27 | {
28 | var grid = UiHelper.AddChild(gameObject, GridTemplate.gameObject);
29 | grid.transform.SetParent(transform, false);
30 | grid.transform.localPosition = new Vector3((x * 210) - 210, (y * -210) + 210, 0);
31 |
32 | var et = new EventTrigger.TriggerEvent();
33 | var localX = x;
34 | var localY = y;
35 | et.AddListener(_ => OnGridClick(localX, localY));
36 | grid.GetComponent().triggers[0].callback = et;
37 |
38 | _gridRects[x, y] = grid.GetComponent();
39 |
40 | SetMark(x, y, 0);
41 | }
42 | }
43 | GridTemplate.gameObject.SetActive(false);
44 | }
45 |
46 | private void OnGridClick(int x, int y)
47 | {
48 | if (GridClicked != null)
49 | GridClicked(x, y);
50 | }
51 |
52 | public int[,] Grid
53 | {
54 | get { return _gridMarks; }
55 | }
56 |
57 | public int GetMark(int x, int y)
58 | {
59 | return _gridMarks[x, y];
60 | }
61 |
62 | public void SetMark(int x, int y, int value, bool withAnimation = false)
63 | {
64 | _gridMarks[x, y] = value;
65 |
66 | var image = _gridRects[x, y].GetComponent();
67 | var text = _gridRects[x, y].GetComponentInChildren();
68 |
69 | if (value == 0)
70 | {
71 | image.color = new Color(1, 1, 1, 0.8f);
72 | text.text = "";
73 | }
74 | else
75 | {
76 | switch (value)
77 | {
78 | case 1:
79 | text.text = "\xf10c";
80 | text.fontSize = 140;
81 | text.color = Color.red;
82 | break;
83 |
84 | case 2:
85 | text.text = "\xf00d";
86 | text.fontSize = 160;
87 | text.color = Color.blue;
88 | break;
89 | }
90 |
91 | var duration = withAnimation ? 0.5f : 0;
92 | image.DOFade(0.4f, duration);
93 |
94 | // TODO: comment out because it causes exception by setting localPosition as (NaN, NaN, NaN)
95 | // text.GetComponent().DOShakePosition(duration, 20, 20);
96 | }
97 | }
98 |
99 | public void SetHighlight(int x, int y, float delay)
100 | {
101 | var image = _gridRects[x, y].GetComponent();
102 | image.DOFade(0.8f, 0.5f).SetDelay(delay);
103 | image.DOColor(Color.black, 0.5f).SetDelay(delay);
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/src/GameServer/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/src/GameServer/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/GameServer/Authenticator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Security.Cryptography;
3 | using System.Threading.Tasks;
4 | using MongoDB.Driver;
5 | using TrackableData.MongoDB;
6 |
7 | namespace GameServer
8 | {
9 | public static class Authenticator
10 | {
11 | // Information for each user account.
12 | public class AccountInfo
13 | {
14 | public string Id;
15 | public string PassSalt;
16 | public string PassHash;
17 | public long UserId;
18 | public DateTime RegisterTime;
19 | public DateTime LastLoginTime;
20 | }
21 |
22 | // If account exists, check password correct.
23 | // Otherwise create new account with id and password.
24 | public static async Task AuthenticateAsync(string id, string password)
25 | {
26 | if (string.IsNullOrWhiteSpace(id))
27 | return null;
28 |
29 | var accountCollection = MongoDbStorage.Instance.Database.GetCollection("Account");
30 | await EnsureIndex(accountCollection);
31 |
32 | var account = await accountCollection.Find(a => a.Id == id).FirstOrDefaultAsync();
33 | if (account != null)
34 | {
35 | if (PasswordUtility.Verify(password, account.PassSalt, account.PassHash) == false)
36 | return null;
37 |
38 | account.LastLoginTime = DateTime.UtcNow;
39 | await accountCollection.ReplaceOneAsync(a => a.Id == id, account);
40 | }
41 | else
42 | {
43 | var saltHash = PasswordUtility.CreateSaltHash(password);
44 | account = new AccountInfo
45 | {
46 | Id = id,
47 | PassSalt = saltHash.Item1,
48 | PassHash = saltHash.Item2,
49 | UserId = UniqueInt64Id.GenerateNewId(),
50 | RegisterTime = DateTime.UtcNow,
51 | LastLoginTime = DateTime.UtcNow
52 | };
53 | await accountCollection.InsertOneAsync(account);
54 | }
55 |
56 | return account;
57 | }
58 |
59 | private static bool s_indexEnsured;
60 |
61 | private static Task EnsureIndex(IMongoCollection collection)
62 | {
63 | if (s_indexEnsured)
64 | return Task.CompletedTask;
65 |
66 | s_indexEnsured = true;
67 | return collection.Indexes.CreateOneAsync(
68 | Builders.IndexKeys.Ascending(x => x.UserId),
69 | new CreateIndexOptions { Unique = true });
70 | }
71 | }
72 |
73 | // from http://geekswithblogs.net/Nettuce/archive/2012/06/14/salt-and-hash-a-password-in.net.aspx
74 | public static class PasswordUtility
75 | {
76 | public static Tuple CreateSaltHash(string password)
77 | {
78 | var saltBytes = new byte[32];
79 | using (var provider = new RNGCryptoServiceProvider())
80 | provider.GetNonZeroBytes(saltBytes);
81 | var salt = Convert.ToBase64String(saltBytes);
82 | var hash = ComputeHash(password, salt);
83 | return Tuple.Create(salt, hash);
84 | }
85 |
86 | public static string ComputeHash(string password, string salt)
87 | {
88 | var saltBytes = Convert.FromBase64String(salt);
89 | using (var rfc2898DeriveBytes = new Rfc2898DeriveBytes(password, saltBytes, 1000))
90 | return Convert.ToBase64String(rfc2898DeriveBytes.GetBytes(256));
91 | }
92 |
93 | public static bool Verify(string password, string salt, string hash)
94 | {
95 | return hash == ComputeHash(password, salt);
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/src/GameServer.Tests/MockClient.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 | using System.Threading.Tasks;
4 | using Akka.Actor;
5 | using Akka.Interfaced;
6 | using Akka.Interfaced.SlimServer;
7 | using Akka.Interfaced.TestKit;
8 | using Akka.TestKit;
9 | using Domain;
10 |
11 | namespace GameServer.Tests
12 | {
13 | public class MockClient : IUserEventObserver
14 | {
15 | private ClusterNodeContext _clusterContext;
16 | private UserEventObserver _userEventObserver;
17 |
18 | public TestActorBoundChannel Channel { get; private set; }
19 | public ActorBoundChannelRef ChannelRef { get; private set; }
20 | public string LoginId { get; private set; }
21 | public UserLoginRef UserLogin { get; private set; }
22 | public long UserId { get; private set; }
23 | public UserInitiatorRef UserInitiator { get; private set; }
24 | public UserRef User { get; private set; }
25 | public TrackableUserContext UserContext { get; private set; }
26 |
27 | public MockClient(ClusterNodeContext clusterContex)
28 | {
29 | _clusterContext = clusterContex;
30 |
31 | var channel = new TestActorRef(
32 | _clusterContext.System,
33 | Props.Create(() => new TestActorBoundChannel(CreateInitialActor)));
34 | Channel = channel.UnderlyingActor;
35 | ChannelRef = channel.Cast();
36 |
37 | UserLogin = Channel.CreateRef();
38 | }
39 |
40 | private Tuple[] CreateInitialActor(IActorContext context) =>
41 | new[]
42 | {
43 | Tuple.Create(
44 | context.ActorOf(Props.Create(() =>
45 | new UserLoginActor(_clusterContext, context.Self.Cast(), new IPEndPoint(IPAddress.None, 0)))),
46 | new TaggedType[] { typeof(IUserLogin) },
47 | (ActorBindingFlags)0)
48 | };
49 |
50 | public async Task LoginAsync(string id, string password)
51 | {
52 | if (LoginId != null)
53 | throw new InvalidOperationException("Already logined");
54 |
55 | var loginRet = await UserLogin.Login(id, password);
56 | LoginId = id;
57 | UserId = loginRet.Item1;
58 | UserInitiator = (UserInitiatorRef)loginRet.Item2;
59 | }
60 |
61 | public async Task PrepareUserAsync(string id, string password, string userName = null)
62 | {
63 | if (User != null)
64 | throw new InvalidOperationException("Already user prepared!");
65 |
66 | if (UserInitiator == null)
67 | await LoginAsync(id, password);
68 |
69 | _userEventObserver = (UserEventObserver)Channel.CreateObserver(this);
70 |
71 | try
72 | {
73 | UserContext = await UserInitiator.Load(_userEventObserver);
74 | }
75 | catch (ResultException e)
76 | {
77 | if (e.ResultCode == ResultCodeType.UserNeedToBeCreated)
78 | UserContext = await UserInitiator.Create(_userEventObserver, userName ?? id.ToUpper());
79 | else
80 | throw;
81 | }
82 |
83 | User = UserInitiator.Cast();
84 | }
85 |
86 | void IUserEventObserver.UserContextChange(TrackableUserContextTracker userContextTracker)
87 | {
88 | // this method is called by a worker thread of TestActorBoundSession actor
89 | // which is not same with with a test thread but invocation is serialized.
90 | // so if you access _userContext carefully, it could be safe :)
91 | userContextTracker.ApplyTo(UserContext);
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/src/Domain/Game/Logic.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Collections.Generic;
4 |
5 | namespace Domain
6 | {
7 | public static class Logic
8 | {
9 | static Logic()
10 | {
11 | var horizontals =
12 | Enumerable.Range(0, Rule.BoardSize).Select(
13 | y => Enumerable.Range(0, Rule.BoardSize).Select(
14 | x => new PlacePosition(x, y)).ToArray());
15 | var verticals =
16 | Enumerable.Range(0, Rule.BoardSize).Select(
17 | x => Enumerable.Range(0, Rule.BoardSize).Select(
18 | y => new PlacePosition(x, y)).ToArray());
19 | var diagonals =
20 | Enumerable.Range(0, 2).Select(
21 | t => Enumerable.Range(0, Rule.BoardSize).Select(
22 | x => new PlacePosition(x, t == 0 ? x : Rule.BoardSize - 1 - x)).ToArray());
23 | RowPositions = horizontals.Concat(verticals).Concat(diagonals).ToArray();
24 | }
25 |
26 | // array of positions that make victory
27 | public static readonly PlacePosition[][] RowPositions;
28 |
29 | // return index of RowPositions, winning playerId.
30 | public static Tuple FindMatchedRow(int[,] board)
31 | {
32 | for (int i = 0; i < RowPositions.Length; i++)
33 | {
34 | var rps = RowPositions[i];
35 | var v = board[rps[0].X, rps[0].Y];
36 | if (v != 0)
37 | {
38 | if (Enumerable.Range(1, Rule.BoardSize - 1).All(j => v == board[rps[j].X, rps[j].Y]))
39 | return Tuple.Create(i, v);
40 | }
41 | }
42 | return null;
43 | }
44 |
45 | // simple AI
46 | public static PlacePosition DetermineMove(int[,] board, int playerId)
47 | {
48 | // If the player has two in a row, they can place a third to get three in a row.
49 | foreach (var rps in RowPositions)
50 | {
51 | var x = 0;
52 | PlacePosition emptyPosition = null;
53 | foreach (var pos in rps)
54 | {
55 | var v = board[pos.X, pos.Y];
56 | if (v == 0)
57 | emptyPosition = pos;
58 | else if (v == playerId)
59 | x += 1;
60 | }
61 | if (x == Rule.BoardSize - 1 && emptyPosition != null)
62 | return emptyPosition;
63 | }
64 |
65 | // If the opponent has two in a row, the player must play the third themselves to block the opponent.
66 | foreach (var rps in RowPositions)
67 | {
68 | var x = 0;
69 | PlacePosition emptyPosition = null;
70 | foreach (var pos in rps)
71 | {
72 | var v = board[pos.X, pos.Y];
73 | if (v == 0)
74 | emptyPosition = pos;
75 | else if (v != playerId)
76 | x += 1;
77 | }
78 | if (x == Rule.BoardSize - 1 && emptyPosition != null)
79 | return emptyPosition;
80 | }
81 |
82 | // Random pick
83 | var positions = new List();
84 | for (int x = 0; x < Rule.BoardSize; x++)
85 | {
86 | for (int y = 0; y < Rule.BoardSize; y++)
87 | {
88 | if (board[x, y] == 0)
89 | positions.Add(new PlacePosition(x, y));
90 | }
91 | }
92 | if (positions.Count > 0)
93 | return positions[new Random().Next(positions.Count)];
94 |
95 | return null;
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/CodeAnalysisVsHook/Editor/CodeAnalysisVsHook.cs:
--------------------------------------------------------------------------------
1 | #if UNITY_EDITOR_WIN
2 |
3 | using System;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Xml.Linq;
8 | using SyntaxTree.VisualStudio.Unity.Bridge;
9 | using UnityEditor;
10 |
11 | [InitializeOnLoad]
12 | public class CodeAnalysisVsHook
13 | {
14 | private class Utf8StringWriter : StringWriter
15 | {
16 | public override Encoding Encoding
17 | {
18 | get { return Encoding.UTF8; }
19 | }
20 | }
21 |
22 | // NOTE: Good to have
23 | // - automatic nuget package download
24 | // - stylecop file or directory exclude list
25 |
26 | static CodeAnalysisVsHook()
27 | {
28 | ProjectFilesGenerator.ProjectFileGeneration += (name, content) =>
29 | {
30 | var rulesetPath = GetRulesetFile();
31 | if (string.IsNullOrEmpty(rulesetPath))
32 | return content;
33 |
34 | var getStyleCopAnalyzersPath = GetStyleCopAnalyzersPath();
35 | if (string.IsNullOrEmpty(getStyleCopAnalyzersPath))
36 | return content;
37 |
38 | // Insert a ruleset file and StyleCop.Analyzers into a project file
39 |
40 | var document = XDocument.Parse(content);
41 |
42 | var ns = document.Root.Name.Namespace;
43 |
44 | var propertyGroup = document.Root.Descendants(ns + "PropertyGroup").FirstOrDefault();
45 | if (propertyGroup != null)
46 | {
47 | propertyGroup.Add(new XElement(ns + "CodeAnalysisRuleSet", rulesetPath));
48 | }
49 |
50 | var itemGroup = document.Root.Descendants(ns + "ItemGroup").LastOrDefault();
51 | if (itemGroup != null)
52 | {
53 | var newItemGroup = new XElement(ns + "ItemGroup");
54 | foreach (var file in Directory.GetFiles(getStyleCopAnalyzersPath + @"\analyzers\dotnet\cs", "*.dll"))
55 | {
56 | newItemGroup.Add(new XElement(ns + "Analyzer", new XAttribute("Include", file)));
57 | }
58 | itemGroup.AddAfterSelf(newItemGroup);
59 | }
60 |
61 | var str = new Utf8StringWriter();
62 | document.Save(str);
63 | return str.ToString();
64 | };
65 | }
66 |
67 | private static string GetRulesetFile()
68 | {
69 | // Find *.ruleset in traversing parent directories.
70 |
71 | var dir = Directory.GetCurrentDirectory();
72 | try
73 | {
74 | while (true)
75 | {
76 | var files = Directory.GetFiles(dir, "*.ruleset");
77 | if (files.Length > 0)
78 | return files[0];
79 |
80 | dir = Path.GetDirectoryName(dir);
81 | }
82 | }
83 | catch (Exception)
84 | {
85 | return null;
86 | }
87 | }
88 |
89 | private static string GetStyleCopAnalyzersPath()
90 | {
91 | // Find /packages/StyleCop.Analyzers* in traversing parent directories.
92 |
93 | var dir = Directory.GetCurrentDirectory();
94 | try
95 | {
96 | while (true)
97 | {
98 | var packagesPath = Path.Combine(dir, "packages");
99 | if (Directory.Exists(packagesPath))
100 | {
101 | var dirs = Directory.GetDirectories(packagesPath, "StyleCop.Analyzers*");
102 | if (dirs.Length > 0)
103 | return dirs[0];
104 | }
105 |
106 | dir = Path.GetDirectoryName(dir);
107 | }
108 | }
109 | catch (Exception)
110 | {
111 | return null;
112 | }
113 | }
114 | }
115 |
116 | #endif
117 |
--------------------------------------------------------------------------------
/TicTacToe.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "src\Domain\Domain.csproj", "{1C1828E1-AF5D-4E0C-A439-AA31AC14C6D9}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameServer", "src\GameServer\GameServer.csproj", "{FDEEB206-226B-4D6D-AB19-D36F8511880C}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain.Unity3D", "src\Domain.Unity3D\Domain.Unity3D.csproj", "{B1C2A438-600C-43F7-BB86-4BC39B9AA187}"
11 | EndProject
12 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{34745474-A74D-4A9D-B263-CB0E4DF98535}"
13 | ProjectSection(SolutionItems) = preProject
14 | README.md = README.md
15 | EndProjectSection
16 | EndProject
17 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Domain", "Domain", "{D777212B-A370-441B-9C20-3781FE093881}"
18 | EndProject
19 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GameServer", "GameServer", "{EA0E752A-50C5-4E4C-BE04-519C8D869C26}"
20 | EndProject
21 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain.Tests", "src\Domain.Tests\Domain.Tests.csproj", "{2531F7EA-116A-43EA-8064-ED9D09BA43CC}"
22 | EndProject
23 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameServer.Tests", "src\GameServer.Tests\GameServer.Tests.csproj", "{B60FC133-C45E-4E54-977F-DB1457185224}"
24 | EndProject
25 | Global
26 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
27 | Debug|Any CPU = Debug|Any CPU
28 | Release|Any CPU = Release|Any CPU
29 | EndGlobalSection
30 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
31 | {1C1828E1-AF5D-4E0C-A439-AA31AC14C6D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32 | {1C1828E1-AF5D-4E0C-A439-AA31AC14C6D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
33 | {1C1828E1-AF5D-4E0C-A439-AA31AC14C6D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
34 | {1C1828E1-AF5D-4E0C-A439-AA31AC14C6D9}.Release|Any CPU.Build.0 = Release|Any CPU
35 | {FDEEB206-226B-4D6D-AB19-D36F8511880C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36 | {FDEEB206-226B-4D6D-AB19-D36F8511880C}.Debug|Any CPU.Build.0 = Debug|Any CPU
37 | {FDEEB206-226B-4D6D-AB19-D36F8511880C}.Release|Any CPU.ActiveCfg = Release|Any CPU
38 | {FDEEB206-226B-4D6D-AB19-D36F8511880C}.Release|Any CPU.Build.0 = Release|Any CPU
39 | {B1C2A438-600C-43F7-BB86-4BC39B9AA187}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40 | {B1C2A438-600C-43F7-BB86-4BC39B9AA187}.Debug|Any CPU.Build.0 = Debug|Any CPU
41 | {B1C2A438-600C-43F7-BB86-4BC39B9AA187}.Release|Any CPU.ActiveCfg = Release|Any CPU
42 | {B1C2A438-600C-43F7-BB86-4BC39B9AA187}.Release|Any CPU.Build.0 = Release|Any CPU
43 | {2531F7EA-116A-43EA-8064-ED9D09BA43CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44 | {2531F7EA-116A-43EA-8064-ED9D09BA43CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
45 | {2531F7EA-116A-43EA-8064-ED9D09BA43CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
46 | {2531F7EA-116A-43EA-8064-ED9D09BA43CC}.Release|Any CPU.Build.0 = Release|Any CPU
47 | {B60FC133-C45E-4E54-977F-DB1457185224}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
48 | {B60FC133-C45E-4E54-977F-DB1457185224}.Debug|Any CPU.Build.0 = Debug|Any CPU
49 | {B60FC133-C45E-4E54-977F-DB1457185224}.Release|Any CPU.ActiveCfg = Release|Any CPU
50 | {B60FC133-C45E-4E54-977F-DB1457185224}.Release|Any CPU.Build.0 = Release|Any CPU
51 | EndGlobalSection
52 | GlobalSection(SolutionProperties) = preSolution
53 | HideSolutionNode = FALSE
54 | EndGlobalSection
55 | GlobalSection(NestedProjects) = preSolution
56 | {1C1828E1-AF5D-4E0C-A439-AA31AC14C6D9} = {D777212B-A370-441B-9C20-3781FE093881}
57 | {FDEEB206-226B-4D6D-AB19-D36F8511880C} = {EA0E752A-50C5-4E4C-BE04-519C8D869C26}
58 | {B1C2A438-600C-43F7-BB86-4BC39B9AA187} = {D777212B-A370-441B-9C20-3781FE093881}
59 | {2531F7EA-116A-43EA-8064-ED9D09BA43CC} = {D777212B-A370-441B-9C20-3781FE093881}
60 | {B60FC133-C45E-4E54-977F-DB1457185224} = {EA0E752A-50C5-4E4C-BE04-519C8D869C26}
61 | EndGlobalSection
62 | EndGlobal
63 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/AkkaInterfacedSlimSocket/UnitySlimTaskCompletionSource.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using UnityEngine;
4 |
5 | namespace Akka.Interfaced.SlimSocket.Client
6 | {
7 | public class UnitySlimTaskCompletionSource : Task, ISlimTaskCompletionSource
8 | {
9 | internal MonoBehaviour Owner { get; set; }
10 |
11 | private Exception _exception;
12 | private TResult _result;
13 |
14 | // Handle for Unity Coroutine.
15 | // It may be used like as 'yield return task.WaitHandle'
16 | public object WaitHandle
17 | {
18 | get { return Owner.StartCoroutine(WaitForCompleted()); }
19 | }
20 |
21 | private IEnumerator WaitForCompleted()
22 | {
23 | while (IsCompleted == false)
24 | yield return null;
25 | }
26 |
27 | public TaskStatus Status
28 | {
29 | get; private set;
30 | }
31 |
32 | public Exception Exception
33 | {
34 | get
35 | {
36 | return _exception;
37 | }
38 | set
39 | {
40 | if (IsCompleted)
41 | throw new InvalidOperationException("Already completed. status=" + Status);
42 |
43 | _exception = value;
44 | Status = TaskStatus.Faulted;
45 | }
46 | }
47 |
48 | public TResult Result
49 | {
50 | get
51 | {
52 | if (Status != TaskStatus.RanToCompletion)
53 | throw new InvalidOperationException("Result is not set yet. status=" + Status);
54 |
55 | return _result;
56 | }
57 |
58 | set
59 | {
60 | if (IsCompleted)
61 | throw new InvalidOperationException("Already completed. status=" + Status);
62 |
63 | _result = value;
64 | Status = TaskStatus.RanToCompletion;
65 | }
66 | }
67 |
68 | public bool IsCompleted
69 | {
70 | get
71 | {
72 | return Status == TaskStatus.RanToCompletion ||
73 | Status == TaskStatus.Canceled ||
74 | Status == TaskStatus.Faulted;
75 | }
76 | }
77 |
78 | public bool IsSucceeded
79 | {
80 | get { return Status == TaskStatus.RanToCompletion; }
81 | }
82 |
83 | public bool IsFailed
84 | {
85 | get
86 | {
87 | return Status == TaskStatus.Canceled ||
88 | Status == TaskStatus.Faulted;
89 | }
90 | }
91 |
92 | public bool TrySetCanceled()
93 | {
94 | if (IsCompleted)
95 | return false;
96 |
97 | _exception = new OperationCanceledException();
98 | Status = TaskStatus.Canceled;
99 | return true;
100 | }
101 |
102 | public bool TrySetException(Exception e)
103 | {
104 | if (IsCompleted)
105 | return false;
106 |
107 | Exception = e;
108 | return true;
109 | }
110 |
111 | public bool TrySetResult(TResult result)
112 | {
113 | if (IsCompleted)
114 | return false;
115 |
116 | Result = result;
117 | return true;
118 | }
119 |
120 | public override string ToString()
121 | {
122 | if (Status == TaskStatus.RanToCompletion)
123 | return "Result: " + Result;
124 | if (Status == TaskStatus.Faulted)
125 | return "Faulted: " + Exception;
126 | if (Status == TaskStatus.Canceled)
127 | return "Canceled";
128 |
129 | return "Status: " + Status;
130 | }
131 |
132 | public Task Task
133 | {
134 | get { return this; }
135 | }
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/src/GameServer/GameBotActor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Akka.Actor;
4 | using Akka.Interfaced;
5 | using Akka.Interfaced.LogFilter;
6 | using Common.Logging;
7 | using Domain;
8 |
9 | namespace GameServer
10 | {
11 | [Log]
12 | public class GameBotActor : InterfacedActor, IGameObserver
13 | {
14 | private ILog _logger;
15 | private GameRef _game;
16 | private long _userId;
17 | private string _userName;
18 | private GamePlayerRef _gamePlayer;
19 | private int _playerId;
20 | private int[,] _boardGridMarks = new int[Rule.BoardSize, Rule.BoardSize];
21 | private bool _isPlaying;
22 |
23 | public GameBotActor(ClusterNodeContext clusterContext,
24 | GameRef game, long userId, string userName)
25 | {
26 | _logger = LogManager.GetLogger($"GameBotActor({userId}, {userName})");
27 | _game = game;
28 | _userId = userId;
29 | _userName = userName;
30 | }
31 |
32 | protected override async Task OnStart(bool restarted)
33 | {
34 | try
35 | {
36 | var observer = CreateObserver();
37 | var ret = await _game.Join(_userId, _userName, observer, null);
38 | _gamePlayer = _game.Cast().WithRequestWaiter(this);
39 | _playerId = ret.Item1;
40 | }
41 | catch (Exception e)
42 | {
43 | _logger.ErrorFormat("Failed to join game({0})", e, _game.CastToIActorRef().Path);
44 | Self.Tell(InterfacedPoisonPill.Instance);
45 | }
46 | }
47 |
48 | protected override async Task OnGracefulStop()
49 | {
50 | try
51 | {
52 | if (_gamePlayer != null)
53 | await _game.Leave(_userId);
54 | }
55 | catch (Exception e)
56 | {
57 | _logger.ErrorFormat("Failed to leave game({0})", e, _game.CastToIActorRef().Path);
58 | }
59 | }
60 |
61 | private async Task ThinkAndMakeMoveAsync()
62 | {
63 | await Task.Delay(1000);
64 |
65 | // It's required to check isPlaying. Because this function could be called by IGameObserver.MakeMove.
66 | // But when game is finished, IGameObserver.End will be called after MakeMove notification.
67 | // To prevent call MakeMove after game ended, this check should be done.
68 | if (_isPlaying == false)
69 | return;
70 |
71 | var newPos = Logic.DetermineMove(_boardGridMarks, _playerId);
72 | _gamePlayer.WithNoReply().MakeMove(newPos, _userId);
73 | }
74 |
75 | void IGameObserver.Join(int playerId, long userId, string userName)
76 | {
77 | }
78 |
79 | void IGameObserver.Leave(int playerId)
80 | {
81 | }
82 |
83 | void IGameObserver.Begin(int currentPlayerId)
84 | {
85 | _logger.TraceFormat("Game begun");
86 |
87 | _isPlaying = true;
88 |
89 | if (currentPlayerId == _playerId)
90 | RunTask(() => ThinkAndMakeMoveAsync());
91 | }
92 |
93 | void IGameObserver.MakeMove(int playerId, PlacePosition pos, int nextTurnPlayerId)
94 | {
95 | _boardGridMarks[pos.X, pos.Y] = playerId;
96 | if (_isPlaying && nextTurnPlayerId == _playerId)
97 | RunTask(() => ThinkAndMakeMoveAsync());
98 | }
99 |
100 | void IGameObserver.Say(int playerId, string msg)
101 | {
102 | }
103 |
104 | void IGameObserver.End(int winnerPlayerId)
105 | {
106 | _logger.TraceFormat("Game ended and I will stop");
107 |
108 | _isPlaying = false;
109 | Self.Tell(InterfacedPoisonPill.Instance);
110 | }
111 |
112 | void IGameObserver.Abort()
113 | {
114 | _logger.TraceFormat("Game aborted and I will stop");
115 |
116 | _isPlaying = false;
117 | Self.Tell(InterfacedPoisonPill.Instance);
118 | }
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/src/GameClient/Assets/UnityPackages/UiManager/UiMessageBox.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 |
4 | public class UiMessageBox : UiDialog
5 | {
6 | public enum QuestionType
7 | {
8 | Ok,
9 | OkCancel,
10 | RetryCancel,
11 | YesNo,
12 | ContinueStop
13 | }
14 |
15 | public enum QuestionResult
16 | {
17 | Close,
18 | Ok,
19 | Cancel,
20 | Retry,
21 | Yes,
22 | No,
23 | Continue,
24 | Stop
25 | }
26 |
27 | public delegate void QuestionResultDelegate(QuestionResult result);
28 |
29 | public Text MessageText;
30 | public Button[] Buttons;
31 |
32 | public static UiDialogHandle Show(string msg, QuestionResultDelegate callback = null)
33 | {
34 | UiDialogHandle handle;
35 | {
36 | var builtin = UiManager.Instance.FindFromDialogRoot("MessageBox");
37 | if (builtin != null)
38 | {
39 | handle = UiManager.Instance.ShowModalTemplate(builtin.gameObject);
40 | }
41 | else
42 | {
43 | var msgBoxPrefab = Resources.Load("MessageBox") as GameObject;
44 | handle = UiManager.Instance.ShowModalPrefab(msgBoxPrefab);
45 | }
46 | }
47 |
48 | if (callback != null)
49 | handle.Hidden += (dlg, returnValue) => callback((QuestionResult)returnValue);
50 |
51 | var msgBox = (UiMessageBox)handle.Dialog;
52 | msgBox.MessageText.text = msg;
53 | msgBox.Buttons[0].onClick.AddListener(msgBox.OnMessageBoxOkButtonClick);
54 |
55 | return handle;
56 | }
57 |
58 | private void OnMessageBoxOkButtonClick()
59 | {
60 | Hide(QuestionResult.Ok);
61 | }
62 |
63 | public static UiDialogHandle Show(
64 | string msg, QuestionType questionType,
65 | QuestionResultDelegate callback = null, string customOkName = null)
66 | {
67 | UiDialogHandle handle;
68 | {
69 | var builtin = UiManager.Instance.FindFromDialogRoot("MessageQuestionBox");
70 | if (builtin != null)
71 | {
72 | handle = UiManager.Instance.ShowModalTemplate(builtin.gameObject);
73 | }
74 | else
75 | {
76 | var msgBoxPrefab = Resources.Load("MessageQuestionBox") as GameObject;
77 | handle = UiManager.Instance.ShowModalPrefab(msgBoxPrefab);
78 | }
79 | }
80 |
81 | if (callback != null)
82 | handle.Hidden += (dlg, returnValue) => callback((QuestionResult)returnValue);
83 |
84 | var msgBox = (UiMessageBox)handle.Dialog;
85 | msgBox.MessageText.text = msg;
86 |
87 | var b0 = msgBox.Buttons[0];
88 | var b0Text = b0.transform.Find("Text").GetComponent();
89 | var b1 = msgBox.Buttons[1];
90 | var b1Text = b1.transform.Find("Text").GetComponent();
91 |
92 | b1.gameObject.SetActive(questionType != QuestionType.Ok);
93 |
94 | switch (questionType)
95 | {
96 | case QuestionType.Ok:
97 | b0Text.text = customOkName ?? "Ok";
98 | b0.onClick.AddListener(() => msgBox.OnQuestionBoxButtonClick(QuestionResult.Ok));
99 | b1.gameObject.SetActive(false);
100 | break;
101 |
102 | case QuestionType.OkCancel:
103 | b0Text.text = customOkName ?? "Ok";
104 | b0.onClick.AddListener(() => msgBox.OnQuestionBoxButtonClick(QuestionResult.Ok));
105 | b1Text.text = "Cancel";
106 | b1.onClick.AddListener(() => msgBox.OnQuestionBoxButtonClick(QuestionResult.Cancel));
107 | break;
108 |
109 | case QuestionType.RetryCancel:
110 | b0Text.text = "Retry";
111 | b0.onClick.AddListener(() => msgBox.OnQuestionBoxButtonClick(QuestionResult.Retry));
112 | b1Text.text = "Cancel";
113 | b1.onClick.AddListener(() => msgBox.OnQuestionBoxButtonClick(QuestionResult.Cancel));
114 | break;
115 |
116 | case QuestionType.YesNo:
117 | b0Text.text = "Yes";
118 | b0.onClick.AddListener(() => msgBox.OnQuestionBoxButtonClick(QuestionResult.Yes));
119 | b1Text.text = "No";
120 | b1.onClick.AddListener(() => msgBox.OnQuestionBoxButtonClick(QuestionResult.No));
121 | break;
122 |
123 | case QuestionType.ContinueStop:
124 | b0Text.text = "Continue";
125 | b0.onClick.AddListener(() => msgBox.OnQuestionBoxButtonClick(QuestionResult.Continue));
126 | b1Text.text = "Stop";
127 | b1.onClick.AddListener(() => msgBox.OnQuestionBoxButtonClick(QuestionResult.Stop));
128 | break;
129 | }
130 |
131 | return handle;
132 | }
133 |
134 | private void OnQuestionBoxButtonClick(QuestionResult result)
135 | {
136 | Hide(result);
137 | }
138 | }
139 |
--------------------------------------------------------------------------------