コード例 #1
0
 private void B2_Click(object sender, EventArgs e)
 {
     AIGame = true;
     System.Diagnostics.Debug.WriteLine(AIGame.ToString());
     if (AIGame == true && isGame == false)
     {
         isGame = true;
         ShowInfo("Set Difficulty :", "1 Player", "Easy", "Hard");
         return;
     }
     else
     {
         Logic.reset();
         g.DrawBoard();
         timer1.Enabled = true;
         InfoW.Visible  = false;
         game           = true;
         allDif         = AI.difficulty.Hard;
         animeind       = 0;
         curind         = 0;
         IsWin          = false;
         if (isGame == true && AIGame == true)
         {
             if (aiTurn == true)
             {
                 //aiTurn = !aiTurn;
                 AI.GetNextMove(allDif);
             }
             aiTurn = !aiTurn;
         }
     }
 }
コード例 #2
0
 private void B1_Click(object sender, EventArgs e)
 {
     if (isGame == false)
     {
         AIGame = false;
     }
     game = true;
     Logic.reset();
     g.DrawBoard();
     timer1.Enabled = true;
     InfoW.Visible  = false;
     if (isGame == true)
     {
         allDif = AI.difficulty.Easy;
     }
     animeind = 0;
     curind   = 0;
     IsWin    = false;
 }