Anyone who tried to generate labyrinths from a program knows that it isn't an easy task, so I immediately wrote a program to test if that algorithm could be so good, and I got this output:
/\////\\//\/\//\\\\\/\//\\ \////\\\///\/\////\/\\/\/\ /\\/\\\///\/\/\///\/\/\/\\ /\/\\\\\//\/\\\\/\\\\//\\\ ///\/\\\/\\///\/\///////// /\//\/\//\\/\///\\\/\/\/\/ \////\\\/\/\\\\\/\/////\\/ /\//\/\/////\\//\/\\///\\\ \\\\///\\/\/\/\/\\//\\/\\\ ///\\/\\//\\\\/\///\\/\\\\Well, that wasn't exactly what I expected, and I quickly realized that there was a problem with the fonts, so I made some tests trying to change many parameters of the text in a word processor, without success. Modern "\" and "/" characters are not designed for such effect! And the separation of lines was also a problem.
Anyway, I was not satisfied yet, so I studied how to design a program to represent, generate and print such maze using horizontal and vertical characters, learning in the way a lot about this thing. Today I would like to publish my little program 10print.c for anyone interested. This was the result:
| ___ | | | | _______ | | ___ | __ | | | ___|___|___|___|___ | ___| | | | ___|___ |___| | | | | _______|___ | | | | | ___ | ___ | | | | | | | |___ | _______| | |___| | ___| | |___|___| | |_______|___ | | | | ___| | __ | |___ | | | | ___ | ___| | |___| | ___|___ | | ___| | |___|_______|_______| | | |___ | __ ___|_______| | _______________ | | | |_______|___ | | | |___ | ___________| | |_______ | | | |___| | |___ | | | | | | | | | | | | | | | ___| | | |___| | |___| | | | |___|___| | |__ | | | | |___|_______| | ___| | |___ | ___| | |___| | | | | | ___|_______| | ___| | ___|__ _______|___| | |___| | | | | | | ___|___ | | ___ | | | ___| | |___| | | | | | | | |__ ___| | | |___| | ___|___ | | | | | |___|___|___ ___|___|_______| | | | |___|___| | ___ | __ | ___ | _______| | | | |_______ | |_______|___ | | | | | _______| | |_______ | | | __________ ___| | |___| | | | |_______ | |___|___________Much better! I haven't read the 10 PRINT book, but I enjoyed a lot doing this. Thank you for give me such an interesting problem!
No comments:
Post a Comment