コード例 #1
0
        private void m_ButtonStart_Click(object sender, EventArgs e)
        {
            this.Hide();
            FormConcentrationGame newGame = new FormConcentrationGame(m_BoardHight, m_BoardWidth,
                                                                      m_TextBoxFirstPlayer.Text, m_TextBoxSecondPlayer.Text);

            newGame.ShowDialog();
        }
コード例 #2
0
 private void checkEndOfGame()
 {
     if (m_GameManager.IsEndOfGame() == true)
     {
         if (MessageBox.Show(m_GameManager.EndOfGameMessage(), "Good Game!",
                             MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             FormConcentrationGame newGame = new FormConcentrationGame(m_GameManager.Board.Height, m_GameManager.Board.Width,
                                                                       m_GameManager.Player1.Name, m_GameManager.Player2.Name);
             newGame.ShowDialog();
         }
         else
         {
             Application.Exit();
         }
     }
 }