diff --git a/logic/Client/App.xaml b/logic/Client/App.xaml
new file mode 100644
index 00000000..e17b2ec6
--- /dev/null
+++ b/logic/Client/App.xaml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/logic/Client/App.xaml.cs b/logic/Client/App.xaml.cs
new file mode 100644
index 00000000..c5b7641f
--- /dev/null
+++ b/logic/Client/App.xaml.cs
@@ -0,0 +1,11 @@
+namespace Client
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ InitializeComponent();
+ MainPage = new AppShell();
+ }
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/AppShell.xaml b/logic/Client/AppShell.xaml
new file mode 100644
index 00000000..0d2a4a5d
--- /dev/null
+++ b/logic/Client/AppShell.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/logic/Client/AppShell.xaml.cs b/logic/Client/AppShell.xaml.cs
new file mode 100644
index 00000000..942d305b
--- /dev/null
+++ b/logic/Client/AppShell.xaml.cs
@@ -0,0 +1,10 @@
+namespace Client
+{
+ public partial class AppShell : Shell
+ {
+ public AppShell()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/Client.csproj b/logic/Client/Client.csproj
index 02642032..d336e982 100644
--- a/logic/Client/Client.csproj
+++ b/logic/Client/Client.csproj
@@ -1,33 +1,97 @@
-
-
-
- WinExe
- net6.0-windows
- enable
- true
- eesast_software_trans_enlarged.ico
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ net7.0-android;net7.0-ios;net7.0-maccatalyst
+ $(TargetFrameworks);net7.0-windows10.0.19041.0
+
+
+ Exe
+ Client
+ true
+ true
+ enable
+
+
+ Client
+
+
+ com.companyname.client
+ 872eca96-e290-4365-952b-f5e5b16e7217
+
+
+ 1.0
+ 1
+
+ 11.0
+ 13.1
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+ MainPage.xaml
+
+
+ Map.xaml
+
+
+ GameStatusBar.xaml
+
+
+ PlayerStatusBar.xaml
+
+
+
+
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+
+
+
+
+
+
diff --git a/logic/Client/Client.sln b/logic/Client/Client.sln
index aedf36b1..9020b267 100644
--- a/logic/Client/Client.sln
+++ b/logic/Client/Client.sln
@@ -1,37 +1,33 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.1.32328.378
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client.csproj", "{5AD8481D-90EF-410C-BD48-355DB97EEAB3}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Playback", "..\..\playback\Playback\Playback.csproj", "{662FDB27-FBF3-4D2D-BDA4-B4BF4D35B866}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Protos", "..\..\dependency\proto\Protos.csproj", "{A0F72D3B-9A82-48EB-90AF-B3770151AD83}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {5AD8481D-90EF-410C-BD48-355DB97EEAB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5AD8481D-90EF-410C-BD48-355DB97EEAB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5AD8481D-90EF-410C-BD48-355DB97EEAB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5AD8481D-90EF-410C-BD48-355DB97EEAB3}.Release|Any CPU.Build.0 = Release|Any CPU
- {662FDB27-FBF3-4D2D-BDA4-B4BF4D35B866}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {662FDB27-FBF3-4D2D-BDA4-B4BF4D35B866}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {662FDB27-FBF3-4D2D-BDA4-B4BF4D35B866}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {662FDB27-FBF3-4D2D-BDA4-B4BF4D35B866}.Release|Any CPU.Build.0 = Release|Any CPU
- {A0F72D3B-9A82-48EB-90AF-B3770151AD83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A0F72D3B-9A82-48EB-90AF-B3770151AD83}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A0F72D3B-9A82-48EB-90AF-B3770151AD83}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A0F72D3B-9A82-48EB-90AF-B3770151AD83}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {89A74B1B-445C-49EB-9C93-506DC243C227}
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.7.34202.233
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client.csproj", "{F75BC602-8C64-4645-9C9A-2DF71085C52C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Protos", "..\..\dependency\proto\Protos.csproj", "{DAE45955-E55C-4E11-80B4-E7EC77E11C89}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F75BC602-8C64-4645-9C9A-2DF71085C52C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F75BC602-8C64-4645-9C9A-2DF71085C52C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F75BC602-8C64-4645-9C9A-2DF71085C52C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {F75BC602-8C64-4645-9C9A-2DF71085C52C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F75BC602-8C64-4645-9C9A-2DF71085C52C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F75BC602-8C64-4645-9C9A-2DF71085C52C}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {DAE45955-E55C-4E11-80B4-E7EC77E11C89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DAE45955-E55C-4E11-80B4-E7EC77E11C89}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DAE45955-E55C-4E11-80B4-E7EC77E11C89}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DAE45955-E55C-4E11-80B4-E7EC77E11C89}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {4C1CF739-9F04-4B0F-B148-BCC1629AACE7}
+ EndGlobalSection
+EndGlobal
diff --git a/logic/Client/GameStatusBar.xaml b/logic/Client/GameStatusBar.xaml
new file mode 100644
index 00000000..1a7b3139
--- /dev/null
+++ b/logic/Client/GameStatusBar.xaml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/logic/Client/GameStatusBar.xaml.cs b/logic/Client/GameStatusBar.xaml.cs
new file mode 100644
index 00000000..974f97cc
--- /dev/null
+++ b/logic/Client/GameStatusBar.xaml.cs
@@ -0,0 +1,58 @@
+using Protobuf;
+
+namespace Client;
+
+public partial class GameStatusBar : ContentView
+{
+ private readonly int lengthOfHp1Slide;
+ private readonly int lengthOfHp2Slide;
+ private readonly int lengthOfHp3Slide;
+ private readonly int WormHoleFullHp = 18000;
+ public GameStatusBar(Grid parent, int Row, int Column)
+ {
+ InitializeComponent();
+ parent.Children.Add(this);
+ parent.SetColumn(this, Column);
+ parent.SetRow(this, Row);
+ parent.SetRowSpan(this, 2);
+ }
+ public void SetWormHoleValue(MessageOfBuilding wormholeMsg)
+ {
+ if (wormholeMsg.BuildingType != BuildingType.Wormhole)
+ {
+ return;
+ }
+ switch (wormholeMsg.BuildingId)
+ {
+ case 0:
+ WormHole1HpSlide.WidthRequest = wormholeMsg.Hp / WormHoleFullHp * lengthOfHp1Slide;
+ break;
+ case 1:
+ WormHole2HpSlide.WidthRequest = wormholeMsg.Hp / WormHoleFullHp * lengthOfHp2Slide;
+ break;
+ case 2:
+ WormHole3HpSlide.WidthRequest = wormholeMsg.Hp / WormHoleFullHp * lengthOfHp3Slide;
+ break;
+ }
+ }
+
+ public void SetGameTimeValue(MessageOfAll obj)
+ {
+ int min, sec;
+ sec = obj.GameTime / 1000;
+ min = sec / 60;
+ sec = sec % 60;
+ GameTime.Text = "时间:";
+ if (min / 10 == 0)
+ {
+ GameTime.Text += "0";
+ }
+ GameTime.Text += min.ToString() + ":";
+ if (sec / 10 == 0)
+ {
+ GameTime.Text += "0";
+ }
+ GameTime.Text += sec.ToString();
+ }
+
+}
\ No newline at end of file
diff --git a/logic/Client/Logo.png b/logic/Client/Logo.png
deleted file mode 100644
index 6d7d5114..00000000
Binary files a/logic/Client/Logo.png and /dev/null differ
diff --git a/logic/Client/MainPage.xaml b/logic/Client/MainPage.xaml
new file mode 100644
index 00000000..b9589a7a
--- /dev/null
+++ b/logic/Client/MainPage.xaml
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/logic/Client/MainPage.xaml.cs b/logic/Client/MainPage.xaml.cs
new file mode 100644
index 00000000..8164420c
--- /dev/null
+++ b/logic/Client/MainPage.xaml.cs
@@ -0,0 +1,700 @@
+using System;
+using System.Windows;
+using System.Threading.Tasks;
+using Microsoft.Maui.Dispatching;
+using Microsoft.Maui.Controls;
+using System.Drawing;
+using Grpc.Core;
+using Google.Protobuf;
+using System.Runtime.CompilerServices;
+using Protobuf;
+using Microsoft.Maui.Controls.Shapes;
+
+namespace Client
+{
+ public partial class MainPage : ContentPage
+ {
+
+ public MainPage()
+ {
+ Console.WriteLine("Hello World");
+ timer = Dispatcher.CreateTimer();
+ timer.Interval = TimeSpan.FromMicroseconds(50);
+ timer.Tick += new EventHandler(Refresh);
+ timer.Start();
+ Application.Current.UserAppTheme = AppTheme.Light; //Light Theme Mode
+ InitializeComponent();
+ SetStatusBars();
+ InitiateObjects();
+ Map map = new Map(MainGrid, 0, 2, 2);
+ }
+
+ /* Set the StatusBars */
+ private void SetStatusBars()
+ {
+ redPlayer = new PlayerStatusBar(MainGrid, 0, 1, 0);
+ bluePlayer = new PlayerStatusBar(MainGrid, 1, 1, 1);
+ gameStatusBar = new GameStatusBar(MainGrid, 0, 4);
+ }
+
+ /* initiate the Lists of Objects and CountList */
+ private void InitiateObjects()
+ {
+ listOfAll = new List();
+ listOfShip = new List();
+ listOfBuilding = new List();
+ listOfBullet = new List();
+ listOfResource = new List();
+ listOfHome = new List();
+ countMap = new Dictionary();
+ }
+
+ /* Get the Map to default map */
+ private void GetMap(MessageOfMap obj)
+ {
+ int[,] map = new int[50, 50];
+ try
+ {
+ for (int i = 0; i < 50; i++)
+ {
+ for (int j = 0; j < 50; j++)
+ {
+ map[i, j] = Convert.ToInt32(obj.Row[i].Col[j]) + 4;//与proto一致
+ }
+ }
+ }
+ catch
+ {
+ mapFlag = false;
+ }
+ finally
+ {
+ defaultMap = map;
+ mapFlag = true;
+ }
+ }
+
+ private void DrawMap()
+ {
+ resourceArray = new Label[countMap[(int)MapPatchType.Resource]];
+ resourcePositionIndex = new (int x, int y)[countMap[(int)MapPatchType.Resource]];
+ buildingArray = new Label[countMap[(int)MapPatchType.Building]];
+ buildingPositionIndex = new (int x, int y)[countMap[(int)MapPatchType.Building]];
+ // factoryArray = new Label[countMap[(int)MapPatchType.Factory]];
+ // factoryPositionIndex = new int[countMap[(int)MapPatchType.Factory]];
+ // communityArray = new Label[countMap[(int)MapPatchType.Community]];
+ // communityPositionIndex = new int[countMap[(int)MapPatchType.Community]];
+ // fortressArray = new Label[countMap[(int)MapPatchType.Fortress]];
+ // fortressPositionIndex = new int[countMap[(int)MapPatchType.Fortress]];
+ // wormHoleArray = new Label[countMap[(int)MapPatchType.WormHole]];
+ // wormHolePositionIndex = new int[countMap[(int)MapPatchType.WormHole]];
+ int counterOfResource = 0;
+ int counterOfBuilding = 0;
+ // int counterOfFactory = 0;
+ // int counterOfCommunity = 0;
+ // int counterOfFortress = 0;
+ // int counterOfWormHole = 0;
+ for (int i = 0; i < defaultMap.GetLength(0); i++)
+ {
+ for (int j = 0; j < defaultMap.GetLength(1); j++)
+ {
+ mapPatches[i, j] = new()
+ {
+ WidthRequest = unitWidth,
+ HeightRequest = unitHeight,
+ HorizontalOptions = LayoutOptions.Start,
+ VerticalOptions = LayoutOptions.Start,
+ Margin = new Thickness(unitWidth * j, unitHeight * i, 0, 0)
+ };
+ MapPatchType mapPatchType = new MapPatchType();
+ mapPatchType = (MapPatchType)defaultMap[i, j];
+ switch (mapPatchType)
+ {
+ case MapPatchType.RedHome:
+ mapPatches[i, j].Color = Colors.Red; break; //Red Home
+ case MapPatchType.BlueHome:
+ mapPatches[i, j].Color = Colors.Blue; break; //Blue Home
+ case MapPatchType.Ruin:
+ mapPatches[i, j].Color = Colors.Black; break; // Ruin
+ case MapPatchType.Shadow:
+ mapPatches[i, j].Color = Colors.Gray; break; // Shadow
+ case MapPatchType.Asteroid:
+ mapPatches[i, j].Color = Colors.Brown; break; // Asteroid
+ case MapPatchType.Resource:
+ mapPatches[i, j].Color = Colors.Yellow; //Resource
+ resourcePositionIndex[counterOfResource] = (i, j);
+ resourceArray[counterOfResource] = new Label()
+ {
+ FontSize = unitFontSize,
+ WidthRequest = unitWidth,
+ HeightRequest = unitHeight,
+ Text = Convert.ToString(-1),
+ HorizontalOptions = LayoutOptions.Start,
+ VerticalOptions = LayoutOptions.Start,
+ HorizontalTextAlignment = TextAlignment.Center,
+ VerticalTextAlignment = TextAlignment.Center,
+ BackgroundColor = Colors.Transparent
+ };
+ counterOfResource++;
+ break;
+
+ case MapPatchType.Building:
+ mapPatches[i, j].Color = Colors.Orange; //Building
+ buildingPositionIndex[counterOfBuilding] = (i, j);
+ buildingArray[counterOfBuilding] = new Label()
+ {
+ FontSize = unitFontSize,
+ WidthRequest = unitWidth,
+ HeightRequest = unitHeight,
+ Text = Convert.ToString(-1),
+ HorizontalOptions = LayoutOptions.Start,
+ VerticalOptions = LayoutOptions.Start,
+ HorizontalTextAlignment = TextAlignment.Center,
+ VerticalTextAlignment = TextAlignment.Center,
+ BackgroundColor = Colors.Transparent
+ };
+ counterOfBuilding++;
+ break;
+
+ // case MapPatchType.Factory:
+ // mapPatches[i, j].Color = Colors.Orange; //Factory
+ // factoryPositionIndex[counterOfFactory] = 50 * i + j;
+ // resourceArray[counterOfResource] = new Label()
+ // {
+ // FontSize = unitFontSize,
+ // WidthRequest = unitWidth,
+ // HeightRequest = unitHeight,
+ // Text = Convert.ToString(-1),
+ // HorizontalOptions = LayoutOptions.Start,
+ // VerticalOptions = LayoutOptions.Start,
+ // HorizontalTextAlignment = TextAlignment.Center,
+ // VerticalTextAlignment = TextAlignment.Center,
+ // BackgroundColor = Colors.Transparent
+ // };
+ // counterOfFactory++;
+ // break;
+ // case MapPatchType.Community:
+ // mapPatches[i, j].Color = Colors.Green; //Community
+ // communityPositionIndex[counterOfCommunity] = 50 * i + j;
+ // communityArray[counterOfCommunity] = new Label()
+ // {
+ // FontSize = unitFontSize,
+ // WidthRequest = unitWidth,
+ // HeightRequest = unitHeight,
+ // Text = Convert.ToString(-1),
+ // HorizontalOptions = LayoutOptions.Start,
+ // VerticalOptions = LayoutOptions.Start,
+ // HorizontalTextAlignment = TextAlignment.Center,
+ // VerticalTextAlignment = TextAlignment.Center,
+ // BackgroundColor = Colors.Transparent
+ // };
+ // counterOfCommunity++;
+ // break;
+ // case MapPatchType.Fortress:
+ // mapPatches[i, j].Color = Colors.Azure; //Fortress
+ // fortressPositionIndex[counterOfFortress] = 50 * i + j;
+ // fortressArray[counterOfFortress] = new Label()
+ // {
+ // FontSize = unitFontSize,
+ // WidthRequest = unitWidth,
+ // HeightRequest = unitHeight,
+ // Text = Convert.ToString(-1),
+ // HorizontalOptions = LayoutOptions.Start,
+ // VerticalOptions = LayoutOptions.Start,
+ // HorizontalTextAlignment = TextAlignment.Center,
+ // VerticalTextAlignment = TextAlignment.Center,
+ // BackgroundColor = Colors.Transparent
+ // };
+ // counterOfFortress++;
+ // break;
+ // case MapPatchType.WormHole:
+ // mapPatches[i, j].Color = Colors.Purple; //Purple
+ // wormHolePositionIndex[counterOfWormHole] = 50 * i + j;
+ // wormHoleArray[counterOfWormHole] = new Label()
+ // {
+ // FontSize = unitFontSize,
+ // WidthRequest = unitWidth,
+ // HeightRequest = unitHeight,
+ // Text = Convert.ToString(-1),
+ // HorizontalOptions = LayoutOptions.Start,
+ // VerticalOptions = LayoutOptions.Start,
+ // HorizontalTextAlignment = TextAlignment.Center,
+ // VerticalTextAlignment = TextAlignment.Center,
+ // BackgroundColor = Colors.Transparent
+ // };
+ // counterOfWormHole++;
+ // break;
+ default:
+ break;
+ }
+ MapGrid.Children.Add(mapPatches[i, j]);
+ }
+ }
+ hasDrawed = true;
+ }
+
+ private async void OnReceive()
+ {
+ try
+ {
+ while (responseStream != null && await responseStream.ResponseStream.MoveNext())
+ {
+ lock (drawPicLock)
+ {
+ listOfShip.Clear();
+ listOfBuilding.Clear();
+ listOfBullet.Clear();
+ listOfResource.Clear();
+ listOfHome.Clear();
+ listOfAll.Clear();
+ MessageToClient content = responseStream.ResponseStream.Current;
+ MessageOfMap mapMassage = new MessageOfMap();
+ bool mapMessageExist = false;
+ switch (content.GameState)
+ {
+ case GameState.GameStart:
+ foreach (var obj in content.ObjMessage)
+ {
+ switch (obj.MessageOfObjCase)
+ {
+ case MessageOfObj.MessageOfObjOneofCase.ShipMessage:
+ listOfShip.Add(obj.ShipMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.BuildingMessage:
+ listOfBuilding.Add(obj.BuildingMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.BulletMessage:
+ listOfBullet.Add(obj.BulletMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.ResourceMessage:
+ listOfResource.Add(obj.ResourceMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.HomeMessage:
+ listOfHome.Add(obj.HomeMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.MapMessage:
+ mapMassage = obj.MapMessage;
+ break;
+ }
+ }
+ listOfAll.Add(content.AllMessage);
+ countMap.Clear();
+ countMap.Add((int)MapPatchType.Resource, listOfResource.Count);
+ countMap.Add((int)MapPatchType.Building, listOfBuilding.Count);
+ GetMap(mapMassage);
+ break;
+ case GameState.GameRunning:
+ foreach (var obj in content.ObjMessage)
+ {
+ switch (obj.MessageOfObjCase)
+ {
+ case MessageOfObj.MessageOfObjOneofCase.ShipMessage:
+ listOfShip.Add(obj.ShipMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.BuildingMessage:
+ listOfBuilding.Add(obj.BuildingMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.BulletMessage:
+ listOfBullet.Add(obj.BulletMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.ResourceMessage:
+ listOfResource.Add(obj.ResourceMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.HomeMessage:
+ listOfHome.Add(obj.HomeMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.MapMessage:
+ mapMassage = obj.MapMessage;
+ mapMessageExist = true;
+ break;
+ }
+ }
+ listOfAll.Add(content.AllMessage);
+ if (mapMessageExist)
+ {
+ countMap.Clear();
+ countMap.Add((int)MapPatchType.Resource, listOfResource.Count);
+ countMap.Add((int)MapPatchType.Building, listOfBuilding.Count);
+ GetMap(mapMassage);
+ mapMessageExist = false;
+ }
+ break;
+
+ case GameState.GameEnd:
+ DisplayAlert("Info", "Game End", "OK");
+ foreach (var obj in content.ObjMessage)
+ {
+ switch (obj.MessageOfObjCase)
+ {
+ case MessageOfObj.MessageOfObjOneofCase.ShipMessage:
+ listOfShip.Add(obj.ShipMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.BuildingMessage:
+ listOfBuilding.Add(obj.BuildingMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.BulletMessage:
+ listOfBullet.Add(obj.BulletMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.ResourceMessage:
+ listOfResource.Add(obj.ResourceMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.HomeMessage:
+ listOfHome.Add(obj.HomeMessage);
+ break;
+
+ case MessageOfObj.MessageOfObjOneofCase.MapMessage:
+ mapMassage = obj.MapMessage;
+ break;
+ }
+ }
+ listOfAll.Add(content.AllMessage);
+ break;
+ }
+ }
+ if (responseStream == null)
+ {
+ throw new Exception("Unconnected");
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ /*
+ #TODO
+ Show the error message
+ */
+ }
+ }
+
+ private int FindIndexOfResource(MessageOfResource obj)
+ {
+ for (int i = 0; i < listOfResource.Count; i++)
+ {
+ if (resourcePositionIndex[i].x == obj.X && resourcePositionIndex[i].y == obj.Y)
+ {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ private int FindIndexOfBuilding(MessageOfBuilding obj)
+ {
+ for (int i = 0; i < listOfBuilding.Count; i++)
+ {
+ if (buildingPositionIndex[i].x == obj.X && buildingPositionIndex[i].y == obj.Y)
+ {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ private void Refresh(object sender, EventArgs e)
+ {
+ try
+ {
+ lock (drawPicLock)
+ {
+ if (!isClientStocked)
+ {
+ MapGrid.Children.Clear();
+ foreach (var data in listOfAll)
+ {
+ gameStatusBar.SetGameTimeValue(data);
+ }
+ if (!hasDrawed && mapFlag)
+ {
+ DrawMap();
+ }
+ foreach (var data in listOfHome)
+ {
+ if (data.Team == PlayerTeam.Down)
+ {
+ redPlayer.SetPlayerValue(data);
+ }
+ else
+ {
+ bluePlayer.SetPlayerValue(data);
+ }
+ DrawHome(data);
+ }
+ foreach (var data in listOfBuilding)
+ {
+ if (data.BuildingType == BuildingType.Wormhole)
+ {
+ gameStatusBar.SetWormHoleValue(data);
+ }
+ DrawBuilding(data);
+ }
+ foreach (var data in listOfBullet)
+ {
+ DrawBullet(data);
+ }
+ foreach (var data in listOfResource)
+ {
+ DrawResource(data);
+ }
+ foreach (var data in listOfShip)
+ {
+ if (data.Team == PlayerTeam.Down)
+ {
+ redPlayer.SetShipValue(data);
+ }
+ else
+ {
+ bluePlayer.SetShipValue(data);
+ }
+ // TODO: Dynamic change the ships' label
+ DrawShip(data);
+ }
+ }
+ }
+ }
+ finally
+ {
+
+ }
+ counter++;
+ }
+
+ private void DrawHome(MessageOfHome data)
+ {
+ Ellipse iconOfHome = new()
+ {
+ WidthRequest = 2 * characterRadiusTimes * unitWidth,
+ HeightRequest = 2 * characterRadiusTimes * unitHeight,
+ HorizontalOptions = LayoutOptions.Start,
+ VerticalOptions = LayoutOptions.Start,
+ Margin = new Thickness(unitHeight * data.Y / 1000.0 - unitWidth * characterRadiusTimes, unitWidth * data.X / 1000.0 - unitWidth * characterRadiusTimes, 0, 0),
+ Fill = data.Team == PlayerTeam.Down ? Colors.Red : Colors.Blue
+ };
+ MapGrid.Children.Add(iconOfHome);
+ }
+
+ private void DrawBuilding(MessageOfBuilding data)
+ {
+ int hp = data.Hp;
+ //TODO: calculate the percentage of Hp
+ int idx = FindIndexOfBuilding(data);
+ buildingArray[idx].FontSize = unitFontSize;
+ buildingArray[idx].WidthRequest = unitWidth;
+ buildingArray[idx].HeightRequest = unitHeight;
+ buildingArray[idx].Text = Convert.ToString(hp);
+ buildingArray[idx].Margin = new Thickness(unitHeight * data.Y / 1000.0 - unitWidth * characterRadiusTimes, unitWidth * data.X / 1000.0 - unitWidth * characterRadiusTimes, 0, 0);
+ switch (data.BuildingType)
+ {
+ case BuildingType.Factory:
+ buildingArray[idx].BackgroundColor = Colors.Chocolate;
+ break;
+ case BuildingType.Community:
+ buildingArray[idx].BackgroundColor = Colors.Green;
+ break;
+ case BuildingType.Fortress:
+ buildingArray[idx].BackgroundColor = Colors.Azure;
+ break;
+ case BuildingType.Wormhole:
+ buildingArray[idx].BackgroundColor = Colors.Purple;
+ break;
+ }
+ MapGrid.Children.Add(buildingArray[idx]);
+ }
+
+ private void DrawBullet(MessageOfBullet data)
+ {
+ Ellipse iconOfBullet = new()
+ {
+ WidthRequest = 2 * bulletRadiusTimes * unitWidth,
+ HeightRequest = 2 * bulletRadiusTimes * unitHeight,
+ HorizontalOptions = LayoutOptions.Start,
+ VerticalOptions = LayoutOptions.Start,
+ Margin = new Thickness(unitHeight * data.Y / 1000.0 - unitWidth * bulletRadiusTimes, unitWidth * data.X / 1000.0 - unitWidth * bulletRadiusTimes, 0, 0),
+ Fill = data.Team == PlayerTeam.Down ? Colors.Red : Colors.Blue
+ };
+ switch (data.Type)
+ {
+ case BulletType.Plasma:
+ iconOfBullet.Fill = Colors.Yellow;
+ break;
+ case BulletType.Laser:
+ iconOfBullet.Fill = Colors.Orange;
+ break;
+ case BulletType.Missile:
+ iconOfBullet.Fill = Colors.Purple;
+ break;
+ case BulletType.ElectricArc:
+ iconOfBullet.Fill = Colors.Green;
+ break;
+ }
+ MapGrid.Children.Add(iconOfBullet);
+ }
+
+ private void DrawResource(MessageOfResource data)
+ {
+ int idx = FindIndexOfResource(data);
+ resourceArray[idx].FontSize = unitFontSize;
+ resourceArray[idx].WidthRequest = unitWidth;
+ resourceArray[idx].HeightRequest = unitHeight;
+ resourceArray[idx].Text = Convert.ToString(data.Progress);
+ resourceArray[idx].Margin = new Thickness(unitHeight * data.Y / 1000.0 - unitWidth * characterRadiusTimes, unitWidth * data.X / 1000.0 - unitWidth * characterRadiusTimes, 0, 0);
+ MapGrid.Children.Add(resourceArray[idx]);
+ }
+
+ private void DrawShip(MessageOfShip data)
+ {
+ Ellipse iconOfShip = new()
+ {
+ WidthRequest = 2 * characterRadiusTimes * unitWidth,
+ HeightRequest = 2 * characterRadiusTimes * unitHeight,
+ HorizontalOptions = LayoutOptions.Start,
+ VerticalOptions = LayoutOptions.Start,
+ Margin = new Thickness(unitHeight * data.Y / 1000.0 - unitWidth * characterRadiusTimes, unitWidth * data.X / 1000.0 - unitWidth * characterRadiusTimes, 0, 0),
+ Fill = data.Team == PlayerTeam.Down ? Colors.Red : Colors.Blue
+ };
+ Label nameOfShip = new()
+ {
+ FontSize = unitFontSize,
+ WidthRequest = unitWidth,
+ HeightRequest = unitHeight,
+ Text = data.ShipType.ToString()[0] + data.ShipId.ToString(),
+ HorizontalOptions = LayoutOptions.Start,
+ VerticalOptions = LayoutOptions.Start,
+ HorizontalTextAlignment = TextAlignment.Center,
+ VerticalTextAlignment = TextAlignment.Center,
+ BackgroundColor = Colors.Transparent,
+ Margin = new Thickness(unitHeight * data.Y / 1000.0 - unitWidth * characterRadiusTimes, unitWidth * data.X / 1000.0 - unitWidth * characterRadiusTimes, 0, 0)
+ };
+ MapGrid.Children.Add(iconOfShip);
+ MapGrid.Children.Add(nameOfShip);
+ }
+
+ private readonly IDispatcherTimer timer;
+ private long counter;
+
+ AsyncServerStreamingCall? responseStream;
+ private bool isClientStocked;
+
+ private PlayerStatusBar redPlayer;
+ private PlayerStatusBar bluePlayer;
+ private GameStatusBar gameStatusBar;
+
+ private bool isPlaybackMode;
+ private long playerID;
+ private double unit;
+ private double unitFontSize = 10;
+ private double unitHeight = 10.6;
+ private double unitWidth = 10.6;
+ private readonly BoxView[,] mapPatches = new BoxView[50, 50];
+ private readonly double characterRadiusTimes = 400;
+ private readonly double bulletRadiusTimes = 200;
+
+
+
+
+ private List listOfAll;
+ private List listOfShip;
+ private List listOfBuilding;
+ private List listOfBullet;
+ private List listOfResource;
+ private List listOfHome;
+ private int gameTime;
+
+ private Label[] resourceArray;
+ private (int x, int y)[] resourcePositionIndex;
+ private Label[] buildingArray;
+ private (int x, int y)[] buildingPositionIndex;
+ // private Label[] factoryArray;
+ // private int[] factoryPositionIndex;
+ // private Label[] communityArray;
+ // private int[] communityPositionIndex;
+ // private Label[] fortressArray;
+ // private int[] fortressPositionIndex;
+ // private Label[] wormHoleArray;
+ // private int[] wormHolePositionIndex;
+ private Dictionary countMap;
+
+ private object drawPicLock = new object();
+
+ private bool mapFlag = false;
+ private bool hasDrawed = false;
+ public int[,] defaultMap = new int[,] {
+ { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 },//6墙,1-5出生点
+ { 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },//7草
+ { 6, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6 },//8机
+ { 6, 0, 0, 0, 0, 6, 0, 6, 7, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 }
+ };
+
+ enum MapPatchType
+ {
+ Space = 0,
+ RedHome = 1,
+ BlueHome = 2,
+ Ruin = 3,
+ Shadow = 4,
+ Asteroid = 5,
+ Resource = 6,
+ Building = 7
+ };
+
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/Map.xaml b/logic/Client/Map.xaml
new file mode 100644
index 00000000..7362ab8e
--- /dev/null
+++ b/logic/Client/Map.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
diff --git a/logic/Client/Map.xaml.cs b/logic/Client/Map.xaml.cs
new file mode 100644
index 00000000..0ba36693
--- /dev/null
+++ b/logic/Client/Map.xaml.cs
@@ -0,0 +1,43 @@
+namespace Client;
+
+public partial class Map : ContentView
+{
+ public Map(Grid parent, int Row, int Column, int RowSpan = 2)
+ {
+ InitializeComponent();
+ parent.Children.Add(this);
+ parent.SetColumn(this, Column);
+ parent.SetRow(this, Row);
+ parent.SetRowSpan(this, RowSpan);
+ // DrawMap();
+ }
+
+ // public void DrawMap()
+ // {
+ // for (int i = 0; i < 50; i++)
+ // {
+ // MapGrid.AddRowDefinition(new RowDefinition(13));
+ // for (int j = 0; j < 50; j++)
+ // {
+ // MapGrid.AddColumnDefinition(new ColumnDefinition(13));
+ // BoxView boxView = new BoxView
+ // {
+ // Color = Colors.Gray,
+ // HeightRequest = 13,
+ // WidthRequest = 13
+ // };
+ // Border border = new Border
+ // {
+ // Content = boxView,
+ // HeightRequest = 13,
+ // WidthRequest = 13,
+ // Padding = 0,
+ // StrokeThickness = 0.005
+ // };
+ // MapGrid.Children.Add(border);
+ // Grid.SetColumn(border, i);
+ // Grid.SetRow(border, j);
+ // }
+ // }
+ // }
+}
\ No newline at end of file
diff --git a/logic/Client/MauiProgram.cs b/logic/Client/MauiProgram.cs
new file mode 100644
index 00000000..20bac49f
--- /dev/null
+++ b/logic/Client/MauiProgram.cs
@@ -0,0 +1,25 @@
+using Microsoft.Extensions.Logging;
+
+namespace Client
+{
+ public static class MauiProgram
+ {
+ public static MauiApp CreateMauiApp()
+ {
+ var builder = MauiApp.CreateBuilder();
+ builder
+ .UseMauiApp()
+ .ConfigureFonts(fonts =>
+ {
+ fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
+ fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
+ });
+
+#if DEBUG
+ builder.Logging.AddDebug();
+#endif
+
+ return builder.Build();
+ }
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/Platforms/Android/AndroidManifest.xml b/logic/Client/Platforms/Android/AndroidManifest.xml
new file mode 100644
index 00000000..bdec9b59
--- /dev/null
+++ b/logic/Client/Platforms/Android/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/logic/Client/Platforms/Android/MainActivity.cs b/logic/Client/Platforms/Android/MainActivity.cs
new file mode 100644
index 00000000..9371cc36
--- /dev/null
+++ b/logic/Client/Platforms/Android/MainActivity.cs
@@ -0,0 +1,11 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+
+namespace Client
+{
+ [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
+ public class MainActivity : MauiAppCompatActivity
+ {
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/Platforms/Android/MainApplication.cs b/logic/Client/Platforms/Android/MainApplication.cs
new file mode 100644
index 00000000..2e6ebfc6
--- /dev/null
+++ b/logic/Client/Platforms/Android/MainApplication.cs
@@ -0,0 +1,16 @@
+using Android.App;
+using Android.Runtime;
+
+namespace Client
+{
+ [Application]
+ public class MainApplication : MauiApplication
+ {
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/Platforms/Android/Resources/values/colors.xml b/logic/Client/Platforms/Android/Resources/values/colors.xml
new file mode 100644
index 00000000..5cd16049
--- /dev/null
+++ b/logic/Client/Platforms/Android/Resources/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #512BD4
+ #2B0B98
+ #2B0B98
+
\ No newline at end of file
diff --git a/logic/Client/Platforms/MacCatalyst/AppDelegate.cs b/logic/Client/Platforms/MacCatalyst/AppDelegate.cs
new file mode 100644
index 00000000..a921e3d4
--- /dev/null
+++ b/logic/Client/Platforms/MacCatalyst/AppDelegate.cs
@@ -0,0 +1,10 @@
+using Foundation;
+
+namespace Client
+{
+ [Register("AppDelegate")]
+ public class AppDelegate : MauiUIApplicationDelegate
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/Platforms/MacCatalyst/Info.plist b/logic/Client/Platforms/MacCatalyst/Info.plist
new file mode 100644
index 00000000..0690e472
--- /dev/null
+++ b/logic/Client/Platforms/MacCatalyst/Info.plist
@@ -0,0 +1,30 @@
+
+
+
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/logic/Client/Platforms/MacCatalyst/Program.cs b/logic/Client/Platforms/MacCatalyst/Program.cs
new file mode 100644
index 00000000..1e979766
--- /dev/null
+++ b/logic/Client/Platforms/MacCatalyst/Program.cs
@@ -0,0 +1,16 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace Client
+{
+ public class Program
+ {
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/Platforms/Tizen/Main.cs b/logic/Client/Platforms/Tizen/Main.cs
new file mode 100644
index 00000000..926d42eb
--- /dev/null
+++ b/logic/Client/Platforms/Tizen/Main.cs
@@ -0,0 +1,17 @@
+using Microsoft.Maui;
+using Microsoft.Maui.Hosting;
+using System;
+
+namespace Client
+{
+ internal class Program : MauiApplication
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+
+ static void Main(string[] args)
+ {
+ var app = new Program();
+ app.Run(args);
+ }
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/Platforms/Tizen/tizen-manifest.xml b/logic/Client/Platforms/Tizen/tizen-manifest.xml
new file mode 100644
index 00000000..f129498a
--- /dev/null
+++ b/logic/Client/Platforms/Tizen/tizen-manifest.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ maui-appicon-placeholder
+
+
+
+
+ http://tizen.org/privilege/internet
+
+
+
+
\ No newline at end of file
diff --git a/logic/Client/Platforms/Windows/App.xaml b/logic/Client/Platforms/Windows/App.xaml
new file mode 100644
index 00000000..79a0eb8d
--- /dev/null
+++ b/logic/Client/Platforms/Windows/App.xaml
@@ -0,0 +1,8 @@
+
+
+
diff --git a/logic/Client/Platforms/Windows/App.xaml.cs b/logic/Client/Platforms/Windows/App.xaml.cs
new file mode 100644
index 00000000..61333fff
--- /dev/null
+++ b/logic/Client/Platforms/Windows/App.xaml.cs
@@ -0,0 +1,24 @@
+using Microsoft.UI.Xaml;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace Client.WinUI
+{
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ public partial class App : MauiWinUIApplication
+ {
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/Platforms/Windows/Package.appxmanifest b/logic/Client/Platforms/Windows/Package.appxmanifest
new file mode 100644
index 00000000..29eac062
--- /dev/null
+++ b/logic/Client/Platforms/Windows/Package.appxmanifest
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+ $placeholder$
+ User Name
+ $placeholder$.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/logic/Client/Platforms/Windows/app.manifest b/logic/Client/Platforms/Windows/app.manifest
new file mode 100644
index 00000000..466affca
--- /dev/null
+++ b/logic/Client/Platforms/Windows/app.manifest
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/logic/Client/Platforms/iOS/AppDelegate.cs b/logic/Client/Platforms/iOS/AppDelegate.cs
new file mode 100644
index 00000000..a921e3d4
--- /dev/null
+++ b/logic/Client/Platforms/iOS/AppDelegate.cs
@@ -0,0 +1,10 @@
+using Foundation;
+
+namespace Client
+{
+ [Register("AppDelegate")]
+ public class AppDelegate : MauiUIApplicationDelegate
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/Platforms/iOS/Info.plist b/logic/Client/Platforms/iOS/Info.plist
new file mode 100644
index 00000000..358337bb
--- /dev/null
+++ b/logic/Client/Platforms/iOS/Info.plist
@@ -0,0 +1,32 @@
+
+
+
+
+ LSRequiresIPhoneOS
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/logic/Client/Platforms/iOS/Program.cs b/logic/Client/Platforms/iOS/Program.cs
new file mode 100644
index 00000000..1e979766
--- /dev/null
+++ b/logic/Client/Platforms/iOS/Program.cs
@@ -0,0 +1,16 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace Client
+{
+ public class Program
+ {
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/PlayerStatusBar.xaml b/logic/Client/PlayerStatusBar.xaml
new file mode 100644
index 00000000..42f5246a
--- /dev/null
+++ b/logic/Client/PlayerStatusBar.xaml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/logic/Client/PlayerStatusBar.xaml.cs b/logic/Client/PlayerStatusBar.xaml.cs
new file mode 100644
index 00000000..c5551556
--- /dev/null
+++ b/logic/Client/PlayerStatusBar.xaml.cs
@@ -0,0 +1,140 @@
+using System;
+using Protobuf;
+
+namespace Client
+{
+ public partial class PlayerStatusBar : ContentView
+ {
+ enum PlayerRole
+ {
+ Red, //the down player
+ Blue //the up player
+ };
+ PlayerRole myRole;
+ private readonly int lengthOfHpSlide = 240;
+
+ List shipLabels = new List();
+ public PlayerStatusBar(Grid parent, int Row, int Column, int role)
+ {
+ InitializeComponent();
+ if (role == 0)
+ {
+ myRole = PlayerRole.Red;
+ }
+ else
+ {
+ myRole = PlayerRole.Blue;
+ }
+ parent.Children.Add(this);
+ parent.SetColumn(this, Column);
+ parent.SetRow(this, Row);
+ shipLabels.Add(new ShipLabel());
+ shipLabels.Add(new ShipLabel());
+ shipLabels.Add(new ShipLabel());
+ DrawSelfInfo();
+ DrawShipTable();
+ }
+
+ private void DrawSelfInfo()
+ {
+ if (myRole == PlayerRole.Red)
+ {
+ MyName.Text = "Red Player";
+ MyColor.Color = Colors.Red;
+ MyHpSlide.Color = Colors.Red;
+ }
+ else
+ {
+ MyName.Text = "Blue Player";
+ MyColor.Color = Colors.Blue;
+ MyHpSlide.Color = Colors.Blue;
+ }
+ }
+
+ private void DrawShipTable()
+ {
+ for (int shipCounter = 0; shipCounter < shipLabels.Count; shipCounter++)
+ {
+ if (myRole == PlayerRole.Red)
+ {
+ shipLabels[shipCounter].hpSlide.Color = Colors.Red;
+ }
+ else
+ {
+ shipLabels[shipCounter].hpSlide.Color = Colors.Blue;
+ }
+ Grid shipStatusGrid = new Grid();
+ shipStatusGrid.RowDefinitions.Add(new RowDefinition());
+ shipStatusGrid.RowDefinitions.Add(new RowDefinition(10));
+ shipStatusGrid.Add(shipLabels[shipCounter].status);
+ shipStatusGrid.Add(shipLabels[shipCounter].hpSlide);
+ shipStatusGrid.SetRow(shipLabels[shipCounter].status, 0);
+ shipStatusGrid.SetRow(shipLabels[shipCounter].hpSlide, 1);
+
+ ShipAllAttributesGrid.Children.Add(shipLabels[shipCounter].name);
+ ShipAllAttributesGrid.Children.Add(shipLabels[shipCounter].producer);
+ ShipAllAttributesGrid.Children.Add(shipLabels[shipCounter].constructor);
+ ShipAllAttributesGrid.Children.Add(shipLabels[shipCounter].armor);
+ ShipAllAttributesGrid.Children.Add(shipLabels[shipCounter].shield);
+ ShipAllAttributesGrid.Children.Add(shipLabels[shipCounter].weapon);
+ ShipAllAttributesGrid.Children.Add(shipStatusGrid);
+ //ShipAllAttributesGrid.Children.Add(shipLabels[shipCounter].status);
+
+ ShipAllAttributesGrid.SetRow(shipLabels[shipCounter].name, shipCounter);
+ ShipAllAttributesGrid.SetRow(shipLabels[shipCounter].producer, shipCounter);
+ ShipAllAttributesGrid.SetRow(shipLabels[shipCounter].constructor, shipCounter);
+ ShipAllAttributesGrid.SetRow(shipLabels[shipCounter].armor, shipCounter);
+ ShipAllAttributesGrid.SetRow(shipLabels[shipCounter].shield, shipCounter);
+ ShipAllAttributesGrid.SetRow(shipLabels[shipCounter].weapon, shipCounter);
+ ShipAllAttributesGrid.SetRow(shipStatusGrid, shipCounter);
+ //ShipAllAttributesGrid.SetRow(shipLabels[shipCounter].status, shipCounter);
+
+ ShipAllAttributesGrid.SetColumn(shipLabels[shipCounter].name, 0);
+ ShipAllAttributesGrid.SetColumn(shipLabels[shipCounter].producer, 1);
+ ShipAllAttributesGrid.SetColumn(shipLabels[shipCounter].constructor, 2);
+ ShipAllAttributesGrid.SetColumn(shipLabels[shipCounter].armor, 3);
+ ShipAllAttributesGrid.SetColumn(shipLabels[shipCounter].shield, 4);
+ ShipAllAttributesGrid.SetColumn(shipLabels[shipCounter].weapon, 5);
+ ShipAllAttributesGrid.SetColumn(shipStatusGrid, 6);
+ //ShipAllAttributesGrid.SetColumn(shipLabels[shipCounter].status, 6);
+ }
+ }
+
+ public void SetPlayerValue(MessageOfHome player)
+ {
+ if (player.Team == PlayerTeam.Down && myRole == PlayerRole.Red || player.Team == PlayerTeam.Up && myRole == PlayerRole.Blue)
+ {
+ MyHpData.Text = player.Hp.ToString();
+ MyHpSlide.WidthRequest = player.Hp / 100.0 * lengthOfHpSlide;
+ MyMoney.Text = player.Economy.ToString();
+ }
+ }
+
+ public void SetShipValue(MessageOfShip ship)
+ {
+ if (ship.Team == PlayerTeam.Down && myRole == PlayerRole.Red || ship.Team == PlayerTeam.Up && myRole == PlayerRole.Blue)
+ {
+ ShipLabel shipLabel = new ShipLabel();
+ shipLabel.name.Text = ship.ShipType.ToString() + ship.ShipId.ToString();
+ shipLabel.producer.Text = ship.CollectorType.ToString();
+ shipLabel.armor.Text = ship.ArmorType.ToString();
+ shipLabel.shield.Text = ship.ShieldType.ToString();
+ shipLabel.weapon.Text = ship.BulletType.ToString();
+ shipLabel.constructor.Text = ship.BuilderType.ToString();
+ shipLabel.status.Text = ship.ShipState.ToString();
+ }
+ //TODO: Dynamic change the ships
+ }
+ }
+ public class ShipLabel
+ {
+ public Label name = new Label() { Text = "name" };
+ public Label producer = new Label() { Text = "producer" };
+ public Label constructor = new Label() { Text = "constructor" };
+ public Label armor = new Label() { Text = "armor" };
+ public Label shield = new Label() { Text = "shield" };
+ public Label weapon = new Label() { Text = "weapon" };
+ public Label status = new Label() { Text = "IDLE" };
+ public BoxView hpSlide = new BoxView() { Color = Colors.Red, WidthRequest = 80, HeightRequest = 3, HorizontalOptions = LayoutOptions.Start, VerticalOptions = LayoutOptions.End };
+ };
+}
\ No newline at end of file
diff --git a/logic/Client/Properties/PlayerBarGrid_new.xml b/logic/Client/Properties/PlayerBarGrid_new.xml
new file mode 100644
index 00000000..e661f071
--- /dev/null
+++ b/logic/Client/Properties/PlayerBarGrid_new.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/logic/Client/Properties/launchSettings.json b/logic/Client/Properties/launchSettings.json
new file mode 100644
index 00000000..c16206a8
--- /dev/null
+++ b/logic/Client/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "MsixPackage",
+ "nativeDebugging": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/logic/Client/Protos.csproj b/logic/Client/Protos.csproj
new file mode 100644
index 00000000..106e9152
--- /dev/null
+++ b/logic/Client/Protos.csproj
@@ -0,0 +1,35 @@
+
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/logic/Client/Resources/AppIcon/appicon.svg b/logic/Client/Resources/AppIcon/appicon.svg
new file mode 100644
index 00000000..5f04fcfc
--- /dev/null
+++ b/logic/Client/Resources/AppIcon/appicon.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/logic/Client/Resources/AppIcon/appiconfg.svg b/logic/Client/Resources/AppIcon/appiconfg.svg
new file mode 100644
index 00000000..62d66d7a
--- /dev/null
+++ b/logic/Client/Resources/AppIcon/appiconfg.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/logic/Client/Resources/Fonts/OpenSans-Regular.ttf b/logic/Client/Resources/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 00000000..8a58a8d0
Binary files /dev/null and b/logic/Client/Resources/Fonts/OpenSans-Regular.ttf differ
diff --git a/logic/Client/Resources/Fonts/OpenSans-Semibold.ttf b/logic/Client/Resources/Fonts/OpenSans-Semibold.ttf
new file mode 100644
index 00000000..7affba1d
Binary files /dev/null and b/logic/Client/Resources/Fonts/OpenSans-Semibold.ttf differ
diff --git a/logic/Client/Resources/Images/dotnet_bot.svg b/logic/Client/Resources/Images/dotnet_bot.svg
new file mode 100644
index 00000000..51b1c330
--- /dev/null
+++ b/logic/Client/Resources/Images/dotnet_bot.svg
@@ -0,0 +1,93 @@
+
diff --git a/logic/Client/Resources/Images/eesast_logo_32x32.png b/logic/Client/Resources/Images/eesast_logo_32x32.png
new file mode 100644
index 00000000..49670adb
Binary files /dev/null and b/logic/Client/Resources/Images/eesast_logo_32x32.png differ
diff --git a/logic/Client/Resources/Images/eesast_software_trans_enlarged_256x256.png b/logic/Client/Resources/Images/eesast_software_trans_enlarged_256x256.png
new file mode 100644
index 00000000..17f18f40
Binary files /dev/null and b/logic/Client/Resources/Images/eesast_software_trans_enlarged_256x256.png differ
diff --git a/logic/Client/Resources/Raw/AboutAssets.txt b/logic/Client/Resources/Raw/AboutAssets.txt
new file mode 100644
index 00000000..50b8a7b8
--- /dev/null
+++ b/logic/Client/Resources/Raw/AboutAssets.txt
@@ -0,0 +1,15 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories). Deployment of the asset to your application
+is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
+
+
+
+These files will be deployed with you package and will be accessible using Essentials:
+
+ async Task LoadMauiAsset()
+ {
+ using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
+ using var reader = new StreamReader(stream);
+
+ var contents = reader.ReadToEnd();
+ }
diff --git a/logic/Client/Resources/Splash/splash.svg b/logic/Client/Resources/Splash/splash.svg
new file mode 100644
index 00000000..62d66d7a
--- /dev/null
+++ b/logic/Client/Resources/Splash/splash.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/logic/Client/Resources/Styles/Colors.xaml b/logic/Client/Resources/Styles/Colors.xaml
new file mode 100644
index 00000000..d183ec43
--- /dev/null
+++ b/logic/Client/Resources/Styles/Colors.xaml
@@ -0,0 +1,44 @@
+
+
+
+
+ #512BD4
+ #DFD8F7
+ #2B0B98
+ White
+ Black
+ #E1E1E1
+ #C8C8C8
+ #ACACAC
+ #919191
+ #6E6E6E
+ #404040
+ #212121
+ #141414
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #F7B548
+ #FFD590
+ #FFE5B9
+ #28C2D1
+ #7BDDEF
+ #C3F2F4
+ #3E8EED
+ #72ACF1
+ #A7CBF6
+
+
\ No newline at end of file
diff --git a/logic/Client/Resources/Styles/Styles.xaml b/logic/Client/Resources/Styles/Styles.xaml
new file mode 100644
index 00000000..050b36c8
--- /dev/null
+++ b/logic/Client/Resources/Styles/Styles.xaml
@@ -0,0 +1,405 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/logic/ClientTest/ClientTest.csproj b/logic/ClientTest/ClientTest.csproj
index e76f9356..6f38f3a6 100644
--- a/logic/ClientTest/ClientTest.csproj
+++ b/logic/ClientTest/ClientTest.csproj
@@ -1,20 +1,20 @@
-
- Exe
- net6.0
- enable
- enable
-
+
+ Exe
+ net6.0
+ enable
+ enable
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
diff --git a/logic/ClientTest/Program.cs b/logic/ClientTest/Program.cs
new file mode 100644
index 00000000..eb31b4e3
--- /dev/null
+++ b/logic/ClientTest/Program.cs
@@ -0,0 +1,42 @@
+//using Grpc.Core;
+//using Protobuf;
+
+namespace ClientTest
+{
+ public class Program
+ {
+ public static Task Main(string[] args)
+ {
+ //Thread.Sleep(3000);
+ //Channel channel = new Channel("127.0.0.1:8888", ChannelCredentials.Insecure);
+ //var client = new AvailableService.AvailableServiceClient(channel);
+ //PlayerMsg playerInfo = new();
+ //playerInfo.PlayerId = 0;
+ //playerInfo.PlayerType = PlayerType.StudentPlayer;
+ //playerInfo.StudentType = StudentType.Athlete;
+ //var call = client.AddPlayer(playerInfo);
+ //MoveMsg moveMsg = new();
+ //moveMsg.PlayerId = 0;
+ //moveMsg.TimeInMilliseconds = 100;
+ //moveMsg.Angle = 0;
+ //int tot = 0;
+ ///*while (await call.ResponseStream.MoveNext())
+ //{
+ // var currentGameInfo = call.ResponseStream.Current;
+ // if (currentGameInfo.GameState == GameState.GameStart) break;
+ //}*/
+ //while (true)
+ //{
+ // Thread.Sleep(50);
+ // MoveRes boolRes = client.Move(moveMsg);
+ // if (boolRes.ActSuccess == false) break;
+ // tot++;
+ // if (tot % 10 == 0) moveMsg.Angle += 1;
+
+ // Console.WriteLine("Move!");
+ //}
+
+ return Task.CompletedTask;
+ }
+ }
+}
\ No newline at end of file
diff --git a/logic/Server/Program.cs b/logic/Server/Program.cs
index 71bb2d7d..d591dc09 100644
--- a/logic/Server/Program.cs
+++ b/logic/Server/Program.cs
@@ -2,73 +2,73 @@
//using Grpc.Core;
//using Protobuf;
-//namespace Server
-//{
-// public class Program
-// {
-// const string welcome =
-//@"
-// _____ _ _ _ _ _ ___ _____
-// |_ _| | | | | | | / \ |_ _|___ |
-// | | | |_| | | | |/ _ \ | | / /
-// | | | _ | |_| / ___ \ | | / /
-// |_| |_| |_|\___/_/ \_\___|/_/
-//";
-// static ServerBase CreateServer(ArgumentOptions options)
-// {
-// //return options.Playback ? new PlaybackServer(options) : new GameServer(options);
-// return new PlaybackServer(options);
-// }
-
-// static int Main(string[] args)
-// {
-// foreach (var arg in args)
-// {
-// Console.Write($"{arg} ");
-// }
-// Console.WriteLine();
-
-// ArgumentOptions? options = null;
-// _ = Parser.Default.ParseArguments(args).WithParsed(o => { options = o; });
-// if (options == null)
-// {
-// Console.WriteLine("Argument parsing failed!");
-// return 1;
-// }
-
-// if (options.StartLockFile == "114514")
-// {
-// Console.WriteLine(welcome);
-// }
-// Console.WriteLine("Server begins to run: " + options.ServerPort.ToString());
-
-// try
-// {
-// var server = CreateServer(options);
-// Grpc.Core.Server rpcServer = new Grpc.Core.Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) })
-// {
-// Services = { AvailableService.BindService(server) },
-// Ports = { new ServerPort(options.ServerIP, options.ServerPort, ServerCredentials.Insecure) }
-// };
-// rpcServer.Start();
-
-// Console.WriteLine("Server begins to listen!");
-// server.WaitForEnd();
-// Console.WriteLine("Server end!");
-// rpcServer.ShutdownAsync().Wait();
-
-// Thread.Sleep(50);
-// Console.WriteLine("");
-// Console.WriteLine("=================== Final Score ====================");
-// Console.WriteLine($"Team0: {server.GetScore()[0]}");
-// Console.WriteLine($"Team1: {server.GetScore()[1]}");
-// }
-// catch (Exception ex)
-// {
-// Console.WriteLine(ex.ToString());
-// Console.WriteLine(ex.StackTrace);
-// }
-// return 0;
-// }
-// }
-//}
+namespace Server
+{
+ public class Program
+ {
+ // const string welcome =
+ //@"
+ // _____ _ _ _ _ _ ___ _____
+ // |_ _| | | | | | | / \ |_ _|___ |
+ // | | | |_| | | | |/ _ \ | | / /
+ // | | | _ | |_| / ___ \ | | / /
+ // |_| |_| |_|\___/_/ \_\___|/_/
+ //";
+ // static ServerBase CreateServer(ArgumentOptions options)
+ // {
+ // //return options.Playback ? new PlaybackServer(options) : new GameServer(options);
+ // return new PlaybackServer(options);
+ // }
+
+ static int Main(string[] args)
+ {
+ // foreach (var arg in args)
+ // {
+ // Console.Write($"{arg} ");
+ // }
+ // Console.WriteLine();
+
+ // ArgumentOptions? options = null;
+ // _ = Parser.Default.ParseArguments(args).WithParsed(o => { options = o; });
+ // if (options == null)
+ // {
+ // Console.WriteLine("Argument parsing failed!");
+ // return 1;
+ // }
+
+ // if (options.StartLockFile == "114514")
+ // {
+ // Console.WriteLine(welcome);
+ // }
+ // Console.WriteLine("Server begins to run: " + options.ServerPort.ToString());
+
+ // try
+ // {
+ // var server = CreateServer(options);
+ // Grpc.Core.Server rpcServer = new Grpc.Core.Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) })
+ // {
+ // Services = { AvailableService.BindService(server) },
+ // Ports = { new ServerPort(options.ServerIP, options.ServerPort, ServerCredentials.Insecure) }
+ // };
+ // rpcServer.Start();
+
+ // Console.WriteLine("Server begins to listen!");
+ // server.WaitForEnd();
+ // Console.WriteLine("Server end!");
+ // rpcServer.ShutdownAsync().Wait();
+
+ // Thread.Sleep(50);
+ // Console.WriteLine("");
+ // Console.WriteLine("=================== Final Score ====================");
+ // Console.WriteLine($"Team0: {server.GetScore()[0]}");
+ // Console.WriteLine($"Team1: {server.GetScore()[1]}");
+ // }
+ // catch (Exception ex)
+ // {
+ // Console.WriteLine(ex.ToString());
+ // Console.WriteLine(ex.StackTrace);
+ // }
+ return 0;
+ }
+ }
+}
diff --git a/logic/logic.sln b/logic/logic.sln
index 1d5f2dc3..2bec97ac 100644
--- a/logic/logic.sln
+++ b/logic/logic.sln
@@ -1,75 +1,76 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.0.32014.148
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server", "Server\Server.csproj", "{D033B809-2FB7-4340-B8B4-DDA30D6CA6FF}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameClass", "GameClass\GameClass.csproj", "{39D838F6-2B84-49E1-9CAF-1DFF22960B5D}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gaming", "Gaming\Gaming.csproj", "{BE9E3584-93C0-4E0F-8DAC-967CF4792709}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Preparation", "Preparation\Preparation.csproj", "{E3DC4A37-8A83-40CC-AE47-68E70064C9DB}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClientTest", "ClientTest\ClientTest.csproj", "{F3C98717-DD4F-45B8-B0F0-C217E7E2B5D4}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Protos", "..\dependency\proto\Protos.csproj", "{9ADA1EF8-DF2F-4C2E-9DE2-BC94DF89B44D}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameEngine", "GameEngine\GameEngine.csproj", "{1D1D07F3-C332-4407-AC1B-EAD73F8BB3F3}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Playback", "..\playback\Playback\Playback.csproj", "{FF22960A-6BD9-4C80-A029-9A39FB8F64C4}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{14C1A4DC-3F6C-4A3E-8CD0-2E595C99F1C6}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csproj", "{F8CD6F8B-0EEE-43B6-BEDF-240E1DBB013D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D033B809-2FB7-4340-B8B4-DDA30D6CA6FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D033B809-2FB7-4340-B8B4-DDA30D6CA6FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D033B809-2FB7-4340-B8B4-DDA30D6CA6FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D033B809-2FB7-4340-B8B4-DDA30D6CA6FF}.Release|Any CPU.Build.0 = Release|Any CPU
- {39D838F6-2B84-49E1-9CAF-1DFF22960B5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {39D838F6-2B84-49E1-9CAF-1DFF22960B5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {39D838F6-2B84-49E1-9CAF-1DFF22960B5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {39D838F6-2B84-49E1-9CAF-1DFF22960B5D}.Release|Any CPU.Build.0 = Release|Any CPU
- {BE9E3584-93C0-4E0F-8DAC-967CF4792709}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BE9E3584-93C0-4E0F-8DAC-967CF4792709}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BE9E3584-93C0-4E0F-8DAC-967CF4792709}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BE9E3584-93C0-4E0F-8DAC-967CF4792709}.Release|Any CPU.Build.0 = Release|Any CPU
- {E3DC4A37-8A83-40CC-AE47-68E70064C9DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E3DC4A37-8A83-40CC-AE47-68E70064C9DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E3DC4A37-8A83-40CC-AE47-68E70064C9DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E3DC4A37-8A83-40CC-AE47-68E70064C9DB}.Release|Any CPU.Build.0 = Release|Any CPU
- {F3C98717-DD4F-45B8-B0F0-C217E7E2B5D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F3C98717-DD4F-45B8-B0F0-C217E7E2B5D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F3C98717-DD4F-45B8-B0F0-C217E7E2B5D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F3C98717-DD4F-45B8-B0F0-C217E7E2B5D4}.Release|Any CPU.Build.0 = Release|Any CPU
- {9ADA1EF8-DF2F-4C2E-9DE2-BC94DF89B44D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9ADA1EF8-DF2F-4C2E-9DE2-BC94DF89B44D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9ADA1EF8-DF2F-4C2E-9DE2-BC94DF89B44D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9ADA1EF8-DF2F-4C2E-9DE2-BC94DF89B44D}.Release|Any CPU.Build.0 = Release|Any CPU
- {1D1D07F3-C332-4407-AC1B-EAD73F8BB3F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1D1D07F3-C332-4407-AC1B-EAD73F8BB3F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1D1D07F3-C332-4407-AC1B-EAD73F8BB3F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1D1D07F3-C332-4407-AC1B-EAD73F8BB3F3}.Release|Any CPU.Build.0 = Release|Any CPU
- {FF22960A-6BD9-4C80-A029-9A39FB8F64C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FF22960A-6BD9-4C80-A029-9A39FB8F64C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FF22960A-6BD9-4C80-A029-9A39FB8F64C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FF22960A-6BD9-4C80-A029-9A39FB8F64C4}.Release|Any CPU.Build.0 = Release|Any CPU
- {F8CD6F8B-0EEE-43B6-BEDF-240E1DBB013D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F8CD6F8B-0EEE-43B6-BEDF-240E1DBB013D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F8CD6F8B-0EEE-43B6-BEDF-240E1DBB013D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F8CD6F8B-0EEE-43B6-BEDF-240E1DBB013D}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {F8195A94-4DCA-4F27-BCB8-9E6310A1127E}
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.32014.148
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server", "Server\Server.csproj", "{D033B809-2FB7-4340-B8B4-DDA30D6CA6FF}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameClass", "GameClass\GameClass.csproj", "{39D838F6-2B84-49E1-9CAF-1DFF22960B5D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gaming", "Gaming\Gaming.csproj", "{BE9E3584-93C0-4E0F-8DAC-967CF4792709}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Preparation", "Preparation\Preparation.csproj", "{E3DC4A37-8A83-40CC-AE47-68E70064C9DB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClientTest", "ClientTest\ClientTest.csproj", "{F3C98717-DD4F-45B8-B0F0-C217E7E2B5D4}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Protos", "..\dependency\proto\Protos.csproj", "{9ADA1EF8-DF2F-4C2E-9DE2-BC94DF89B44D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameEngine", "GameEngine\GameEngine.csproj", "{1D1D07F3-C332-4407-AC1B-EAD73F8BB3F3}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Playback", "..\playback\Playback\Playback.csproj", "{FF22960A-6BD9-4C80-A029-9A39FB8F64C4}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{14C1A4DC-3F6C-4A3E-8CD0-2E595C99F1C6}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csproj", "{F8CD6F8B-0EEE-43B6-BEDF-240E1DBB013D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D033B809-2FB7-4340-B8B4-DDA30D6CA6FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D033B809-2FB7-4340-B8B4-DDA30D6CA6FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D033B809-2FB7-4340-B8B4-DDA30D6CA6FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D033B809-2FB7-4340-B8B4-DDA30D6CA6FF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {39D838F6-2B84-49E1-9CAF-1DFF22960B5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {39D838F6-2B84-49E1-9CAF-1DFF22960B5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {39D838F6-2B84-49E1-9CAF-1DFF22960B5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {39D838F6-2B84-49E1-9CAF-1DFF22960B5D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BE9E3584-93C0-4E0F-8DAC-967CF4792709}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BE9E3584-93C0-4E0F-8DAC-967CF4792709}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BE9E3584-93C0-4E0F-8DAC-967CF4792709}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BE9E3584-93C0-4E0F-8DAC-967CF4792709}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E3DC4A37-8A83-40CC-AE47-68E70064C9DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E3DC4A37-8A83-40CC-AE47-68E70064C9DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E3DC4A37-8A83-40CC-AE47-68E70064C9DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E3DC4A37-8A83-40CC-AE47-68E70064C9DB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F3C98717-DD4F-45B8-B0F0-C217E7E2B5D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F3C98717-DD4F-45B8-B0F0-C217E7E2B5D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F3C98717-DD4F-45B8-B0F0-C217E7E2B5D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F3C98717-DD4F-45B8-B0F0-C217E7E2B5D4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9ADA1EF8-DF2F-4C2E-9DE2-BC94DF89B44D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9ADA1EF8-DF2F-4C2E-9DE2-BC94DF89B44D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9ADA1EF8-DF2F-4C2E-9DE2-BC94DF89B44D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9ADA1EF8-DF2F-4C2E-9DE2-BC94DF89B44D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1D1D07F3-C332-4407-AC1B-EAD73F8BB3F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1D1D07F3-C332-4407-AC1B-EAD73F8BB3F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1D1D07F3-C332-4407-AC1B-EAD73F8BB3F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1D1D07F3-C332-4407-AC1B-EAD73F8BB3F3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FF22960A-6BD9-4C80-A029-9A39FB8F64C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FF22960A-6BD9-4C80-A029-9A39FB8F64C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FF22960A-6BD9-4C80-A029-9A39FB8F64C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FF22960A-6BD9-4C80-A029-9A39FB8F64C4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F8CD6F8B-0EEE-43B6-BEDF-240E1DBB013D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F8CD6F8B-0EEE-43B6-BEDF-240E1DBB013D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F8CD6F8B-0EEE-43B6-BEDF-240E1DBB013D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {F8CD6F8B-0EEE-43B6-BEDF-240E1DBB013D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F8CD6F8B-0EEE-43B6-BEDF-240E1DBB013D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {F8195A94-4DCA-4F27-BCB8-9E6310A1127E}
+ EndGlobalSection
+EndGlobal