예제 #1
0
 private void button11_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < 3; i++)
     {
         for (int j = 0; j < 3; j++)
         {
             if (Board.XYCoordinate[i, j] == 1 || Board.XYCoordinate[i, j] == -1)
             {
                 return;
             }
         }
     }
     ComputerMove.Move(Choice, Board);
     Refresh(Board);
 }
예제 #2
0
 private void button4_Click_1(object sender, EventArgs e)
 {
     if (Check.CanClick(Board, 1, 0))
     {
         Board.XYCoordinate[1, 0] = -1;
         Refresh(Board);
         if (Check.IsWin(Board) == 3)
         {
             ComputerMove.Move(Choice, Board);
             Refresh(Board);
             Print.ShowResult(Board);
         }
         else
         {
             Print.ShowResult(Board);
         }
     }
 }