Created
April 9, 2015 20:40
-
-
Save jlcarvalho/d417cc091eb5eb8be1cb to your computer and use it in GitHub Desktop.
Gistter: Labyrinth generated with JavaScript
This file contains hidden or 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
for (var line=1; line<60; line++) { | |
for(var i=1;i<29;i++) { | |
var s = (Math.floor((Math.random()*2)%2)) ? "╱" : "╲"; | |
document.write(s); | |
} | |
document.writeln("<br>"); | |
} |
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Gistter</title> | |
<!-- Necessary to insert the styles --> | |
<link rel="stylesheet" type="text/css" href="main.css"> | |
</head> | |
<body> | |
<!-- Your code here --> | |
<!-- Necessary to insert the javascript --> | |
<script type="text/javascript" src="app.js"></script> | |
</body> | |
</html> |
This file contains hidden or 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
body { | |
line-height: 18px; font-size: 18px; font-family: times; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment