Exemplo n.º 1
0
        private void HandleDeclareWinner(DeclareWinner x)
        {
            Thread.Sleep(1000);
            MessageBox.Show($"GAME OVER\n" +
                            $"WINNER :> {x.WinnerNum}. player => {x.WinnerName}\n" +
                            $"LOSER :> {x.GameOver.PlayerNum}. player => {x.GameOver.PlayerName}");

            var quit = new Quit(x);

            opponent.Tell(x);

            Application.Exit();
        }
Exemplo n.º 2
0
        private void HandleGameOver(GameOver x)
        {
            var winner = new DeclareWinner(x, player.PlayerNumber, username);

            opponent.Tell(winner);
        }
Exemplo n.º 3
0
 public Quit(DeclareWinner declareWinner)
 {
     DeclareWinner = declareWinner;
 }