Maze generation: Difference between revisions
Content added Content deleted
(→{{header|Icon}} and {{header|Unicon}}: updated in prep for solver, changed start/finish selection) |
|||
Line 1,322: | Line 1,322: | ||
if (n<0) {alert("illegal maze dimensions");return;} |
if (n<0) {alert("illegal maze dimensions");return;} |
||
var horiz=[]; for (var j= 0; j<x+1; j++) horiz[j]= []; |
var horiz=[]; for (var j= 0; j<x+1; j++) horiz[j]= []; |
||
var verti=[]; for (var j= 0; j< |
var verti=[]; for (var j= 0; j<y+1; j++) verti[j]= []; |
||
var here= [Math.floor(Math.random()*x), Math.floor(Math.random()*y)]; |
var here= [Math.floor(Math.random()*x), Math.floor(Math.random()*y)]; |
||
var path= [here]; |
var path= [here]; |