diff --git a/registration-system/view/signups/game1/js/pathFinder.js b/registration-system/view/signups/game1/js/pathFinder.js index 6209541278682fd39a2ac6918ab591e961adc266..88d4638cb9f95c016828dfe7dbfea9d9a1deac7b 100644 --- a/registration-system/view/signups/game1/js/pathFinder.js +++ b/registration-system/view/signups/game1/js/pathFinder.js @@ -48,6 +48,18 @@ PathFinder.prototype.generateRaster = function() { }; } } + + if (Game.config.verbosePathFinder) { + var line = ''; + for (var i = 0; i < this.raster.length; i++) { + line += i + ': '; + for (var j = 0; j < this.raster[i].length; j++) { + line += this.raster[i][j].walkable ? '#' : '-'; + } + line += '\n'; + } + console.log(line); + } }; PathFinder.prototype.clearPathScore = function() { var bbox = this.svg[0][0].getBBox(); diff --git a/registration-system/view/signups/game1/test.html b/registration-system/view/signups/game1/test.html index 3c038f6634aa8c208e8b0d2b489f74c2f8e62140..696a405e209ddd98b73e3ccc96a1b394bdbd1b42 100644 --- a/registration-system/view/signups/game1/test.html +++ b/registration-system/view/signups/game1/test.html @@ -63,9 +63,10 @@ var maps = ['map_landing', 'castle_entrance', 'castle_fs', 'dorf']; var game = new Game({ - startMap: maps[0], + startMap: maps[UrlComponents.getValueOf('map') || 0], showEventLayers: UrlComponents.isSet('showEventLayers'), - pathFindingGridSize: 5, + pathFindingGridSize: UrlComponents.isSet('verbosePF') ? 18 : 5, + verbosePathFinder: UrlComponents.isSet('verbosePF'), usePathFinding: true, size: [800, 600] });