Example #1
0
 public void set_play(Square spot)
 {
     if (spot.get_x() == 0)
     {
         if (spot.get_y() == 0)
         {
             A1.Text = "O";
             A1.Enabled = false;
         }
         if (spot.get_y() == 1)
         {
             A2.Text = "O";
             A2.Enabled = false;
         }
         if (spot.get_y() == 2)
         {
             A3.Text = "O";
             A3.Enabled = false;
         }
     }
     if (spot.get_x() == 1)
     {
         if (spot.get_y() == 0)
         {
             B1.Text = "O";
             B1.Enabled = false;
         }
         if (spot.get_y() == 1)
         {
             B2.Text = "O";
             B2.Enabled = false;
         }
         if (spot.get_y() == 2)
         {
             B3.Text = "O";
             B3.Enabled = false;
         }
     }
     if (spot.get_x() == 2)
     {
         if (spot.get_y() == 0)
         {
             C1.Text = "O";
             C1.Enabled = false;
         }
         if (spot.get_y() == 1)
         {
             C2.Text = "O";
             C2.Enabled = false;
         }
         if (spot.get_y() == 2)
         {
             C3.Text = "O";
             C3.Enabled = false;
         }
     }
 }
Example #2
0
 public void play(Square spot, int player)
 {
     this.board[spot.get_x(), spot.get_y()] = player;
 }