]> Dogcows Code - chaz/carfire/blobdiff - CarFire/CarFire/CarFire/MapReader.cs
New Map APIs:
[chaz/carfire] / CarFire / CarFire / CarFire / MapReader.cs
index cfb1f945219cb1bf73e315957bee1cc0fd7285f4..ae03ff9ea7b607aa7055cf411c86fa35031d25d5 100644 (file)
@@ -96,7 +96,7 @@ namespace CarFire
 \r
             public Map GetMap()\r
             {\r
-                return new Map(mMetadata, mGrid, mEntities);\r
+                return new Map(mMetadata, mGrid, mDefaultTile, mEntities, mPlayerPositions);\r
             }\r
 \r
 \r
@@ -312,7 +312,7 @@ namespace CarFire
                     if (mPlayerPositions[i] == default(Point))\r
                     {\r
                         throw new ParserException("Not enough player positions were defined on the grid; " +\r
-                            "are missing a spot for player " + i + ".");\r
+                            "you are missing a spot for player " + i + ".");\r
                     }\r
                 }\r
             }\r
@@ -347,8 +347,8 @@ namespace CarFire
 \r
             public void set_type(string atom)\r
             {\r
-                Map.Type value = Parse.Constant<Map.Type>(atom);\r
-                if (value != default(Map.Type)) mMetadata.Type = value;\r
+                Map.Mode value = Parse.Constant<Map.Mode>(atom);\r
+                if (value != default(Map.Mode)) mMetadata.Type = value;\r
                 else throw new ParserException("Unexpected type on line " + mInput.LineNumber + ": " + atom);\r
             }\r
 \r
@@ -425,10 +425,9 @@ namespace CarFire
             char[,] mGrid;\r
             List<Map.RawEntity> mEntities;\r
             Point[] mPlayerPositions;\r
-\r
-            Dictionary<char, Dictionary<string, string>> mEntitySections = new Dictionary<char, Dictionary<string, string>>();\r
             char mDefaultTile = ' ';\r
 \r
+            Dictionary<char, Dictionary<string, string>> mEntitySections = new Dictionary<char, Dictionary<string, string>>();\r
             LineReader mInput;\r
         }\r
 \r
This page took 0.022912 seconds and 4 git commands to generate.