title: My program keeps changing the color of my entire array to one color instead of different colors for each one
body: <p>I am making a little board generator for my class assignment where I take a 2D array and fill it with an object called a &quot;tile&quot; that has its own symbol, background, and foreground color attached to it (i.e. empty = &quot;#&quot;, background red, and foreground blue while room = &quot;.&quot;, background green, and foreground yellow).</p>
  <p>I have gotten the board created and started to draw rooms on it as well as have my tile class. The only problem I have is that whenever I draw my board it only uses the last tile object parameters given so if I drew a room last it has room parameters. I have tried messing around with it by trying change where I created a tile and tried to create a tile to overide it.</p>
  <p>Here is the code for my board class code:</p>
  <pre><code>namespace BrandonPlayerGen
  {
  public class Board
  {
      public static object[,] board;
      public static int height;
      public static int width;
      
      
      
      public static Array MakeBoard(int bwidth, int bheight)
      {
          Tile empty = new Tile(&quot;#&quot;, ConsoleColor.Red, ConsoleColor.Yellow,false);
          board = new object[bheight, bwidth];
          for (int hcheck = 0; hcheck &lt; (bheight-1); hcheck++)
          {
              for(int wcheck = 0; wcheck &lt; (bwidth-1); wcheck++)
              {
                  
                  
                  board[hcheck, wcheck] = empty;
                  
              }
          }
  
          return board;
      }
  
      
      
      public static void DrawBoard(int dheight, int dwidth)
      {
          dwidth = width;
          dheight = height;
          for (int hcheck = 0; hcheck&lt;dheight; hcheck++)
          {
              for (int wcheck = 0; wcheck &lt; dwidth; wcheck++)
              {
                  Tile.DrawTile();
              }
              Console.Write(&quot;\n&quot;);
          }
      }
  
  
  
      public static Array MakeRoom()
      {
          Tile room = new Tile(&quot;.&quot;, ConsoleColor.Blue, ConsoleColor.Red,true);
  
          int bheight = (height-1);
          int bwidth = (width-1);
  
          int hstart = Random.randInt(1, bheight);
          int wstart = Random.randInt(1, bwidth);
          int rheight = Random.randInt(1, 5);
          int rwidth = Random.randInt(1, 5);
  
          while (hstart &gt; height || hstart &lt; 1 || wstart &lt; 1 || wstart &gt; width||
              (hstart+rheight)&gt;bheight|| (wstart+rwidth)&gt;bwidth)
          {
              hstart = Random.randInt(1, bheight);
              wstart = Random.randInt(1, bwidth);
              rheight = Random.randInt(1, 5);
              rwidth = Random.randInt(1, 5);
          }
  
          for (; hstart&lt;rheight; hstart++)
          {
              for (; wstart &lt; rwidth; wstart++)
              {
                  board[hstart, wstart] = room;
              }
          }
  
          return board;
  
      }
  </code></pre>
  <p>Here is the Code for my tile class:</p>
  <pre><code>namespace BrandonPlayerGen
  {
  public class Tile
  {
      public static string symbol;
      public static ConsoleColor foreColor;
      public static ConsoleColor backColor;
      public static string stairisHere;
  
      public Tile(string boardSymbol, ConsoleColor 
          back, ConsoleColor fore, bool stairs)
      {
          backColor = back;
          foreColor = fore;
          symbol = boardSymbol;
          if (stairs == true)
          {
              symbol = &quot;&lt;&quot;;
              backColor = ConsoleColor.Green;
              foreColor = ConsoleColor.White;
          }
      }
  
      public static void DrawTile()
      {
          
          Console.BackgroundColor = backColor;
          Console.ForegroundColor = foreColor;
          Console.Write(symbol);
          Console.BackgroundColor = ConsoleColor.Black;
          Console.ForegroundColor = ConsoleColor.White;
  
      }
  
      
  }
  }
  </code></pre>
  <p>Here is where the board is called in main:</p>
  <pre><code>int height, width;
          Console.Write(&quot;Please Enter Board height: &quot;);
          height = Convert.ToInt32(Console.ReadLine());
          Console.Write(&quot;Please Enter Board height: &quot;);
          width = Convert.ToInt32(Console.ReadLine());
          Board.height = height;
          Board.width = width;
  
          Board.MakeBoard(height, width);
          Board.DrawBoard(Board.height, Board.width);
          Console.ReadKey();
          Board.MakeRoom();
          
          Board.DrawBoard( Board.width, Board.height);
          Console.ReadKey();
  </code></pre>
  <p>Any help will be greatly appreciated, and sorry if my question is not in the appropriate format this is my first question here.</p>
  <p>Edit:
  Fixed the way tiles were generated so that a new tile was created each time, but the issue of when I show the board and it is all the same color and symbol across the whole board.</p>