Esempio n. 1
0
        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();
                }
            }
        }
Esempio n. 2
0
 public override string GetScore()
 {
     return(ServerScore.ToString() + "-" + ReceiverScore.ToString());
 }