servicepoint-tanks/tanks-backend/TanksServer/Models/Scores.cs

23 lines
428 B
C#
Raw Normal View History

2024-04-13 18:35:36 +02:00
namespace TanksServer.Models;
2024-04-21 23:00:44 +02:00
internal sealed record class Scores
2024-04-13 18:35:36 +02:00
{
2024-04-21 23:00:44 +02:00
public int Kills { get; set; }
2024-04-13 18:35:36 +02:00
2024-04-21 23:00:44 +02:00
public int Deaths { get; set; }
public double Ratio
{
get
{
if (Kills == 0)
return 0;
if (Deaths == 0)
return Kills;
2024-04-21 23:00:44 +02:00
return Math.Round(Kills / (double)Deaths, 3);
}
}
2024-04-19 13:34:56 +02:00
public int WallsDestroyed { get; set; }
2024-04-13 18:35:36 +02:00
}