Maze generation: Difference between revisions

m
→‎version 1: simplified an IF statement. -- ~~~~
m (→‎version 1: changed identation for a subroutine's IF statements. -- ~~~~)
m (→‎version 1: simplified an IF statement. -- ~~~~)
Line 3,738:
do r=1 for height; _= /*display the maze. */
do c=1 for cols*2 + 1; _=_ || @.r.c; end /*c*/
if \(r//2) then _=translate(_,'-\','fa·'x) /*translatetrans to minusbackslash*/
_=translate(_,'\','fa'x) /*trans to backslash*/
_=changestr(1,_,111) /*these four ────────────────────*/
_=changestr(0,_,000) /*─── statements are ────────────*/
_=changestr('-·',_," ") /*──────── used for preserving ──*/
_=changestr('─',_,"───") /*──────────── the aspect ratio. */
say translate(_,'│',"|\10") /*make it presentable for screen.*/