This commit is contained in:
Mootfrost777 2022-04-23 22:49:09 +03:00
parent d995c5f2b7
commit 3868c88ae1
30 changed files with 12 additions and 2399 deletions

Binary file not shown.

View file

@ -333,10 +333,14 @@ namespace Bowling
private int Sum(List<int> score)
{
int sum = 0;
foreach (int a in score)
try
{
sum += a;
foreach (int a in score)
{
sum += a;
}
}
catch { }
return sum;
}
@ -349,8 +353,8 @@ namespace Bowling
{
ball = new Ball(ballStartPosition, Vector2.Zero, Color.Blue, Gutter_top_y, gutter_bottom_y, gutter_height, _graphics.PreferredBackBufferWidth);
menu = new Menu();
player2 = new Player();
player1 = new Player();
player1.Score.Clear();
player2.Score.Clear();
rowWidth = 80;
rowHeight = 50;
tableMarginTop = 20;

File diff suppressed because it is too large Load diff

View file

@ -1,8 +0,0 @@
{
"runtimeOptions": {
"additionalProbingPaths": [
"C:\\Users\\Semejkin_AV\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\Semejkin_AV\\.nuget\\packages"
]
}
}

View file

@ -1,12 +0,0 @@
{
"runtimeOptions": {
"tfm": "netcoreapp3.1",
"framework": {
"name": "Microsoft.WindowsDesktop.App",
"version": "3.1.0"
},
"configProperties": {
"System.Runtime.TieredCompilation": false
}
}
}

View file

@ -1 +0,0 @@
a432b769b6058693c28edb96b2adee2d4f085082

View file

@ -98,14 +98,14 @@ namespace Bowling_Server
{
int dataLength = player.socket.Receive(data);
string json = Encoding.ASCII.GetString(data, 0, dataLength);
if (json.Contains("11"))
if (json == "11")
{
foreach (var player in group)
{
//foreach (var player in group)
//{
player.socket.Send(Encoding.ASCII.GetBytes("11"));
player.Score = new List<int>();
players.Add(player);
}
//}
break;
}
player.Deserialize(json);