title: word search puzzle game
body: <p>I am trying to create a word search game. the problem is I am unable to insert words into a TableLayoutPanel. When I wrote this, I got a compile error that says "no overload for method 'placewords' takes '5' arguments.</p>
  
  <pre><code>public partial class Form1 : Form
  {
      public Form1()
      {
          InitializeComponent();
      }
  
      private void Form1_Load(object sender, EventArgs e)
      {
          Random r = new Random();
          for (int a = 0; a &lt; tableLayoutPanel1.ColumnCount; a++)
          {
              for (int b = 0; b &lt; tableLayoutPanel1.RowCount; b++)
              {
                  Label nl = new Label();
                  int x = r.Next(65, 90);
                  char c = (char)x;
                  nl.Text = c.ToString();
                  tableLayoutPanel1.Controls.Add(nl, a, b);
              }
          }
  
      }
  
      private void newGameToolStripMenuItem_Click(object sender, EventArgs e)
      {
          Application.Restart();
      }
  
  
  
      private void PlaceWords()
      {
  
  
          string[] words = { "byte", "char" };
          Random rn = new Random();
          foreach (string p in words)
          {
              String s = p.Trim();
              bool placed = false;// continue trying to place the word in // the matrix until it fits
              while (placed == false)// generate a new random row and column
              {
                  int nRow = rn.Next(30);// generate a new random x &amp; y direction vector
                  int nCol = rn.Next(30);// x direction: -1, 0, or 1
                  int nDirX = 0;               // y direction -1, 0, or 1
                  int nDirY = 0;               // (although direction can never be 0, 0, this is null)
                  while (nDirX == 0 &amp;&amp; nDirY == 0)
                  {
                      nDirX = rn.Next(3) - 1;
                      nDirY = rn.Next(3) - 1;
                  }
  
                  placed =PlaceWords(s.ToUpper(),nRow,nCol,nDirX,nDirY);
                 }
  
          }
      }
  </code></pre>