title: Generate Tile Map from array
body: <p>I've been thinking about trying to create a RPG game, a simple game with movement, pick up items, and open doors.</p>
  
  <p>I've been thinking for a long time about the tile map engine, but i can't find anything that works :/</p>
  
  <p>Basically what i'm trying to accomplish is i have an <code>enum</code>, like:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public enum tileSort { Dirt, Grass, Stone, Empty }
  </code></pre>
  
  <p>And when the engine runs through the array, which will have 0's, 1's, etc, I'm thinking about a switch statement, something like:</p>
  
  <pre class="lang-cs prettyprint-override"><code>switch(tileSort) 
  { 
      case '0':  tileList.Add(Content.Load&lt;Texture2D&gt;("Tiles/grass")) 
  }
  </code></pre>
  
  <p>The problem is that I have no idea on how to make this possible, all that I've been able to create is an engine that runs through and generates depending on which content you load first into the game.</p>
  
  <p>I know this is confusing, as I'm not good at explaining myself.</p>
  
  <p>Thanks in advance.</p>