private void UpdatePlayer(Player player) { if (player.Position == PlayerPosition.Server) { _serverPrevious = ServerScore; ServerScore = ServerScore.Increase(); if (ServerScore == GameScore.ADVANTAGE && ReceiverScore == GameScore.ADVANTAGE) { ReceiverScore.Decrease(); } } else { _receiverPrevious = ReceiverScore; ReceiverScore = ReceiverScore.Increase(); if (ReceiverScore == GameScore.ADVANTAGE && ServerScore == GameScore.ADVANTAGE) { ServerScore.Decrease(); } } }
public override string GetScore() { return(ServerScore.ToString() + "-" + ReceiverScore.ToString()); }