|
@ -15,7 +15,7 @@ namespace SemiColinGames { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static Dictionary<char, Terrain> mapping = new Dictionary<char, Terrain>(); |
|
|
|
|
|
|
|
|
private readonly static Dictionary<char, Terrain> mapping = new Dictionary<char, Terrain>(); |
|
|
|
|
|
|
|
|
public static Terrain Grass = new Terrain('=', true); |
|
|
public static Terrain Grass = new Terrain('=', true); |
|
|
public static Terrain GrassL = new Terrain('<', true); |
|
|
public static Terrain GrassL = new Terrain('<', true); |
|
@ -160,7 +160,7 @@ namespace SemiColinGames { |
|
|
TileFactory factory = new TileFactory(); |
|
|
TileFactory factory = new TileFactory(); |
|
|
var tilesList = new List<Tile>(); |
|
|
var tilesList = new List<Tile>(); |
|
|
var decorationsList = new List<Tile>(); |
|
|
var decorationsList = new List<Tile>(); |
|
|
string[] worldDesc = levelSpecification.Split('\n'); |
|
|
|
|
|
|
|
|
string[] worldDesc = levelSpecification.Substring(1).Split('\n'); |
|
|
tileWidth = worldDesc.AsQueryable().Max(a => a.Length); |
|
|
tileWidth = worldDesc.AsQueryable().Max(a => a.Length); |
|
|
tileHeight = worldDesc.Length; |
|
|
tileHeight = worldDesc.Length; |
|
|
Debug.WriteLine("world size: {0}x{1}", tileWidth, tileHeight); |
|
|
Debug.WriteLine("world size: {0}x{1}", tileWidth, tileHeight); |
|
|