Exemplo n.º 1
0
 private void startGame_Click(object sender, EventArgs e)
 {
     int numHardness;
     if (easyButton.Checked || mediumButton.Checked || hardButton.Checked)
     {
         if (this.easyButton.Checked)
         {
             numHardness = 4;
         }
         else if (this.mediumButton.Checked)
         {
             numHardness = 5;
         }
         else //hard
         {
             numHardness = 6;
         }
         Boolean allAI = checkBox1.Checked;
         GameEngine ge = new GameEngine(humanPlayerType, numHardness, allAI);
         GameBoard gb = new GameBoard(false, ge);
         gb.Show();
         this.Hide();
         gb.update(ge.gs);
     }    
 }
Exemplo n.º 2
0
        public GameBoard(bool realGame, GameEngine ge)
        {
            InitializeComponent();

            if (realGame)
            {
                initializeRealGame();
            }
            else
            {
                initializeTestGame();
            }
            this.ge = ge;
        }