From 96fcf794d243973102c160996f74d9d9db621d34 Mon Sep 17 00:00:00 2001 From: Oskar Date: Fri, 26 Jan 2018 10:42:00 +0100 Subject: [PATCH] Typo in InitializeSearchExample columns and rows were flipped. Very apparent if cols and rows are different from each other. If you create a cols=100 rows=50 maze the resulting grid will be an Array(50) with an Array(100) each instead of the other way round. --- sketch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sketch.js b/sketch.js index 195898f..ee29b4b 100644 --- a/sketch.js +++ b/sketch.js @@ -172,7 +172,7 @@ var status = ""; var stepsAllowed = 0; var runPauseButton; -function initaliseSearchExample(rows, cols) { +function initaliseSearchExample(cols, rows) { mapGraphic = null; gamemap = new MapFactory().getMap(cols, rows, 10, 10, 410, 410, allowDiagonals, percentWalls); start = gamemap.grid[0][0];