https://github.com/justinmeister/Mario-Level-1/blob/master/d...
Why on Earth would you create the level like this instead of using something like Tiled[1]? Pretty much everything you can make a game with has support for TMX tilemaps, and if not making basic support yourself shouldn't be too hard either, and ultimately way less effort.