36 lines
758 B
C#
36 lines
758 B
C#
|
|
using Fusion;
|
||
|
|
|
||
|
|
namespace Hallucinate.Game
|
||
|
|
{
|
||
|
|
[System.Serializable]
|
||
|
|
public struct PlayerEloData
|
||
|
|
{
|
||
|
|
public int Rating;
|
||
|
|
public int GamesPlayed;
|
||
|
|
|
||
|
|
public PlayerEloData(int rating, int gamesPlayed)
|
||
|
|
{
|
||
|
|
Rating = rating;
|
||
|
|
GamesPlayed = gamesPlayed;
|
||
|
|
}
|
||
|
|
|
||
|
|
public static PlayerEloData Default => new PlayerEloData(1000, 0);
|
||
|
|
}
|
||
|
|
|
||
|
|
public struct EloResult : INetworkStruct
|
||
|
|
{
|
||
|
|
public int NewRatingA;
|
||
|
|
public int NewRatingB;
|
||
|
|
public int DeltaA;
|
||
|
|
public int DeltaB;
|
||
|
|
|
||
|
|
public EloResult(int nA, int nB, int dA, int dB)
|
||
|
|
{
|
||
|
|
NewRatingA = nA;
|
||
|
|
NewRatingB = nB;
|
||
|
|
DeltaA = dA;
|
||
|
|
DeltaB = dB;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|