diff --git a/registration-system/view/signups/game1/js/pathFinder.js b/registration-system/view/signups/game1/js/pathFinder.js index 88d4638cb9f95c016828dfe7dbfea9d9a1deac7b..d11ee50edb1fda8c9a45cc7ae608a1dde8cf5124 100644 --- a/registration-system/view/signups/game1/js/pathFinder.js +++ b/registration-system/view/signups/game1/js/pathFinder.js @@ -50,14 +50,21 @@ PathFinder.prototype.generateRaster = function() { } if (Game.config.verbosePathFinder) { - var line = ''; + var pgm = "P5\n"; + pgm += this.raster[0].length+' '+this.raster.length+'\n'; + pgm += "255\n"; for (var i = 0; i < this.raster.length; i++) { - line += i + ': '; + //line += i + ': '; for (var j = 0; j < this.raster[i].length; j++) { - line += this.raster[i][j].walkable ? '#' : '-'; + pgm += this.raster[i][j].walkable ? ' ' : '~'; } - line += '\n'; + //line += ''; } + + var line = '\n'; + line += "--- .PGM DATA ---\n"; + line += pgm; + line += '\n--- .PGM DATA END ---\n'; console.log(line); } }; @@ -187,4 +194,4 @@ PathFinder.prototype.canWalkOn = function(x, y) { } } return canWalk; -}; \ No newline at end of file +};