Skip to content

Instantly share code, notes, and snippets.

@dolegi
Created September 7, 2018 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dolegi/f89ee854888f855016ae2f24b53ac2f3 to your computer and use it in GitHub Desktop.
Save dolegi/f89ee854888f855016ae2f24b53ac2f3 to your computer and use it in GitHub Desktop.
C64 maze generator
<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