From 644ed88dd8c41297a8a32e034679cf3c8fd8747f Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Mon, 27 Jan 2020 21:51:18 -0500 Subject: [PATCH] World: add Tiles to list so that they're sorted by x-coordinate GitOrigin-RevId: f9c6cf8be450fc78aca950ad63ffa8e86a488de3 --- Shared/World.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shared/World.cs b/Shared/World.cs index cf59a79..54e65ea 100644 --- a/Shared/World.cs +++ b/Shared/World.cs @@ -110,8 +110,8 @@ namespace SemiColinGames { Width = worldDesc.AsQueryable().Max(a => a.Length); Height = worldDesc.Length; 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; if (i < worldDesc[j].Length) { switch (worldDesc[j][i]) {