Ejemplo n.º 1
0
        private Player CreatePlayer(string name)
        {
            var player = new Player(name);

            player.ScoreIncrease += PlayersScoreIncreases;

            return player;
        }
Ejemplo n.º 2
0
 private void PlayersScoreIncreases(object sender, ScoreIncreaseEvent e)
 {
     if (e.Score == 10)
     {
         WinningPLayer = e.Player;
     }
 }
Ejemplo n.º 3
0
 public ScoreIncreaseEvent(int score, Player player)
 {
     Player = player;
     Score = score;
 }