Esempio n. 1
0
 public void buttonPlaySetting()
 {
     if (settingForm.CanStartGame())
     {
         form_view.CreateBoard(StatusApplication.game);
         if (game_model.GetStatusApplication() == StatusApplication.constructor)
         {
             game_model.FillBoardOnForm();
             form_view.panel2.Visible = false;
         }
         else
         {
             buttonClear();
             //form_view.ChangePanels();
             game_model.FillBoardAndListCheckers();
         }
         game_model.SetGame(settingForm.GetColorPlayer1(), settingForm.GetStatusPl1(), settingForm.GetStatusPl2(), settingForm.GetDepthPl1(), settingForm.GetDepthPl2(),
                            settingForm.GetSearchPl1(), settingForm.GetSearchPl2(), settingForm.GetEvaluatePl1(), settingForm.GetEvaluatePl2(), StatusGame.wait);
         if ((game_model.GetStatusPlayer() == StatusPlayer.human) && (game_model.SearchEatingAndWriteToMove()))
         {
             game_model.SetStatusGame(StatusGame.waitEat);
         }
         settingForm.Close();
         settingForm = null;
         game_model.StartGame();
     }
 }     //stting