r/programming • u/balazsbotond • Aug 30 '15
JavaScript “maze generator” in a tweet
https://twitter.com/botond_balazs/status/637960240055615488
841
Upvotes
r/programming • u/balazsbotond • Aug 30 '15
View all comments
Show parent comment
2
u/mozjag Aug 31 '15
I like it! Clever use of ~ to replace that tricky and tempting space character with something solid, and the 5.5+random() brings us closer to the BASIC program that started this all. You could use
'&#'+(9585.5+Math.random()|0)(same character count) to get even closer in spirit.On this computer it looks fine in Chrome but jagged in Firefox.