Implement LobbyServer
This commit is contained in:
26
LobbyServer/ScoreEntry.cs
Normal file
26
LobbyServer/ScoreEntry.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
namespace LobbyServer
|
||||
{
|
||||
public class ScoreEntry
|
||||
{
|
||||
public string Pseudo { get; }
|
||||
public int Score { get; }
|
||||
|
||||
public ScoreEntry(string pseudo, int score)
|
||||
{
|
||||
Pseudo = pseudo;
|
||||
Score = score;
|
||||
}
|
||||
|
||||
public ScoreEntry(string serialized)
|
||||
{
|
||||
var split = serialized.Split(';');
|
||||
Pseudo = split[0];
|
||||
Score = int.Parse(split[1]);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Pseudo};{Score}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user