World: add Tiles to list so that they're sorted by x-coordinate

GitOrigin-RevId: f9c6cf8be450fc78aca950ad63ffa8e86a488de3
This commit is contained in:
Colin McMillen 2020-01-27 21:51:18 -05:00
parent 57e9ea558a
commit 644ed88dd8

View File

@ -110,8 +110,8 @@ namespace SemiColinGames {
Width = worldDesc.AsQueryable().Max(a => a.Length); Width = worldDesc.AsQueryable().Max(a => a.Length);
Height = worldDesc.Length; Height = worldDesc.Length;
Debug.WriteLine("world size: {0}x{1}", Width, Height); Debug.WriteLine("world size: {0}x{1}", Width, Height);
for (int j = 0; j < Height; j++) {
for (int i = 0; i < Width; i++) { for (int i = 0; i < Width; i++) {
for (int j = 0; j < Height; j++) {
Terrain terrain = Terrain.Empty; Terrain terrain = Terrain.Empty;
if (i < worldDesc[j].Length) { if (i < worldDesc[j].Length) {
switch (worldDesc[j][i]) { switch (worldDesc[j][i]) {