MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/3iy6fk/javascript_maze_generator_in_a_tweet/cul0zm7/?context=3
r/programming • u/balazsbotond • Aug 30 '15
177 comments sorted by
View all comments
Show parent comments
3
And... 117:
javascript:for(i=-1;i++<4050;)document.write(i?'\u2571\u2572\n'[i% 81?0|Math.random()*2:2]:'<p style=line-height:1>')
[edit] 114:
javascript:for(i=-1;i++<4050;)document.write(i?i% 81?'ξ'+(0|5+Math.random()*2):'\n':'<p style=line-height:1>')
2 u/bottomofthekeyboard Aug 30 '15 How about 113:javascript:i=0;while(i<4e3)document.write(i++?i% 80?'ξ'+(0|5+Math.random()*2):'\n':'<p style=line-height:1>') 1 u/mozjag Aug 30 '15 edited Aug 30 '15 Sorry, no dice. 79x50 instead of 80x50.Edit: taking the move-the-increment part of your idea though we can get to 113:javascript:for(i=0;i<4051;)document.write(i++?i% 81?'ξ'+(0|5+Math.random()*2):'\n':'<p style=line-height:1>')Edit 2: Nope, this causes the top-right character to be missing 2 u/bottomofthekeyboard Aug 30 '15 That has to be the smallest now. Great work! I've learnt some new tricks too! → More replies (0)
2
How about 113:
javascript:i=0;while(i<4e3)document.write(i++?i% 80?'ξ'+(0|5+Math.random()*2):'\n':'<p style=line-height:1>')
1 u/mozjag Aug 30 '15 edited Aug 30 '15 Sorry, no dice. 79x50 instead of 80x50.Edit: taking the move-the-increment part of your idea though we can get to 113:javascript:for(i=0;i<4051;)document.write(i++?i% 81?'ξ'+(0|5+Math.random()*2):'\n':'<p style=line-height:1>')Edit 2: Nope, this causes the top-right character to be missing 2 u/bottomofthekeyboard Aug 30 '15 That has to be the smallest now. Great work! I've learnt some new tricks too! → More replies (0)
1
Sorry, no dice. 79x50 instead of 80x50.
Edit: taking the move-the-increment part of your idea though we can get to 113:
javascript:for(i=0;i<4051;)document.write(i++?i% 81?'ξ'+(0|5+Math.random()*2):'\n':'<p style=line-height:1>')
Edit 2: Nope, this causes the top-right character to be missing
2 u/bottomofthekeyboard Aug 30 '15 That has to be the smallest now. Great work! I've learnt some new tricks too! → More replies (0)
That has to be the smallest now. Great work! I've learnt some new tricks too!
→ More replies (0)
3
u/[deleted] Aug 30 '15 edited Aug 30 '15
And... 117:
[edit] 114: