Created
September 7, 2018 08:45
-
-
Save dolegi/f89ee854888f855016ae2f24b53ac2f3 to your computer and use it in GitHub Desktop.
C64 maze generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre style=line-height:.9;font-family:fantasy> | |
<script> | |
const lineLength = document.querySelector('body').offsetWidth/10 | |
function writeLine() { | |
for(let i = 1; i < lineLength; i++) { | |
document.write(Math.random()<.5?"/":"\\") | |
} | |
} | |
lineHeight = document.body.scrollHeight/10 | |
for(let i = 1; i < lineHeight; i++){ | |
writeLine() | |
document.write('\n') | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment