Exemplo n.º 1
0
 private void btn_NewGame_Click(object sender, EventArgs e)
 {
     var players = new PlayersAndColorsDialog();
     this.Hide();
     players.ShowDialog();
     if (players.DialogResult == DialogResult.Cancel)
     {
         this.Show();
     }
     else if (players.DialogResult == DialogResult.OK)
     {
         var gameBoard = new frm_gameBoard(players.Controller);
         this.Hide();
         gameBoard.Show();
     }
 }
Exemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     var players = new List<Player> {new Player("Barry") {PlayerColor = Colors.Orange},
                                     new Player("Alice") {PlayerColor = Colors.Blue},
                                     new Player("Pat") {PlayerColor = Colors.White}};
     var controller = new GameController(players);
     var gameBoard = new frm_gameBoard(controller);
     this.Hide();
     gameBoard.Show();
 }