diff --git a/Shared/Levels.cs b/Shared/Levels.cs index 25efac6..1e4ba1d 100644 --- a/Shared/Levels.cs +++ b/Shared/Levels.cs @@ -5,14 +5,15 @@ }; public const string DEMO = @" -7 <=============> -6 { { { } { ; -5 } ; ; ; } -4 } ; } -3 } +8 <=============> +7 { { { } { ; +6 } ; ; ; } +5 } ; } +4 } +3 2 1 -0 <=X=X=X=> <=============> (__________) +0 <=X=X=X=> <===> <===> (__________) 5 / \ 4 | | 3 | | @@ -32,6 +33,7 @@ w wr wqw t wew ww dfffxfffxfffb v twq r wtwv ......................................... ......................................... ......................................... +......................................... ......................................... 0 [................................. 1 [................................. @@ -43,6 +45,7 @@ w wr wqw t wew ww dfffxfffxfffb v twq r wtwv public const string ONE_ONE = @" + diff --git a/Shared/World.cs b/Shared/World.cs index d0ac23b..914fa2e 100644 --- a/Shared/World.cs +++ b/Shared/World.cs @@ -15,7 +15,7 @@ namespace SemiColinGames { } } - private static Dictionary mapping = new Dictionary(); + private readonly static Dictionary mapping = new Dictionary(); public static Terrain Grass = new Terrain('=', true); public static Terrain GrassL = new Terrain('<', true); @@ -160,7 +160,7 @@ namespace SemiColinGames { TileFactory factory = new TileFactory(); var tilesList = new List(); var decorationsList = new List(); - string[] worldDesc = levelSpecification.Split('\n'); + string[] worldDesc = levelSpecification.Substring(1).Split('\n'); tileWidth = worldDesc.AsQueryable().Max(a => a.Length); tileHeight = worldDesc.Length; Debug.WriteLine("world size: {0}x{1}", tileWidth, tileHeight);