title: Issues with breaking out of a for loop
body: <p>Essentially, when a button is pressed the randomMove() method is called, this is mean't to find a empty square in TicTacToe and then assign an "O" to it, the problem is that it then doesn't break out of the loop as at least two squares turn to "O".</p>
  
  <p>I'm not sure where I've gone wrong but I don't doubt it's a simple solution.</p>
  
  <pre><code> private void randomMove()
      {
          for (int i = 0; i &lt; 3; i++)
          {
              for (int a = 0; a &lt; 3; a++)
              {
                  if (Board[a,i] == "")
                  {
                      Board[a,i] = "O";
                      Temp = i + a;
                      compMove(Temp);
                      break;
                  }  
              }
          }
      }
  
      private void compMove(int Temp)
      {
          switch (Temp)
          {
              case 0:
                  btn1.Text = "O";
                  break;
              case 1:
                  btn2.Text = "O";
                  break;
              case 2:
                  btn3.Text = "O";
                  break;
              case 3:
                  btn4.Text = "O";
                  break;
              case 4:
                  btn5.Text = "O";
                  break;
              case 5:
                  btn6.Text = "O";
                  break;
              case 6:
                  btn7.Text = "O";
                  break;
              case 7:
                  btn8.Text = "O";
                  break;
              case 8:
                  btn9.Text = "O";
                  break;
          }
          hasWon();
      }
  </code></pre>