-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🐛 clang format for Server & ClientTest main
- Loading branch information
Showing
6 changed files
with
225 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Google.Protobuf" Version="3.23.3" /> | ||
<PackageReference Include="Grpc" Version="2.46.6" /> | ||
<PackageReference Include="Grpc.Core" Version="2.46.6" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Google.Protobuf" Version="3.23.3" /> | ||
<PackageReference Include="Grpc" Version="2.46.6" /> | ||
<PackageReference Include="Grpc.Core" Version="2.46.6" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\dependency\proto\Protos.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\dependency\proto\Protos.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.