PocketMod Maze Generator

24 Oct 2006

PocketMod maze maker That is pretty much it. This pocketmod generates a new maze each time you reload it. Uses maze algorithms to generate maze. Download it from the site and grab the xml for your flash PocketMod app.

Here is an example below of a maze generator in one line of code by John Tromp. It hard to see from the post, but the code spells out the word “MAZE”, incredible. Visit his site for more details.

char*M,A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf(M="%d",&C);
--            E;             J[              E]             =T
[E   ]=  E)   printf("._");  for(;(A-=Z=!Z)  ||  (printf("n|"
)    ,   A    =              39              ,C             --
)    ;   Z    ||    printf   (M   ))M[Z]=Z[A-(E   =A[J-Z])&&!C
&    A   ==             T[                                  A]
|6<<27^rand()||!C&!Z?J[T[E]=T[A]]=E,J[T[A]=A-Z]=A,"_.":" |"];}

(I had to change one character to get wordpress from “eating” the code. It was the caret in front of rand on the last line, it was supposed to be a <)


Actions

Informations

One response to “PocketMod Maze Generator”

31 10 2006
Fairly Useless… » Micro Maze for PocketMod (22:24:55) :

[…] My kids said that the last maze maker was too easy. Here is a new one, micro maze. It will generate a smaller maze. You can still use the original for the younger children. […]

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>