Maze generation: Difference between revisions

m
→‎{{header|POV-Ray}}: Removed some unnecessary debugging code
(Added POV-Ray solution)
m (→‎{{header|POV-Ray}}: Removed some unnecessary debugging code)
Line 7,289:
#declare Cols = 17;
 
#declare Seed = seed(2); // A seed willproduces alwaysa produce the samefixed sequence of pseudorandom numbers
 
#declare Wall = prism {
Line 7,348:
#local Col = floor(rand(Seed)*(Cols-1) + 0.5); // Random start column
#local Top = -1;
#local Max = -1;
Push(Stack, Top, Row, Col, Row, Col)
 
Line 7,377 ⟶ 7,376:
Push(Stack, Top, Row, Col, Row, Col-1)
#end
#end
 
#if (Top > Max)
#declare Max = Top;
#end
 
Line 7,467 ⟶ 7,462:
</syntaxhighlight>
{{out}}
[[File:Povray maze solution 640px.png|640px|frame|none|alt=POV-Ray maze with red brick walls|POV-Ray solution with 15 rows and 17 columns]]
 
=={{header|Processing}}==
12

edits