-
Notifications
You must be signed in to change notification settings - Fork 17
/
Tetris.html
66 lines (66 loc) · 2.12 KB
/
Tetris.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html>
<head>
<title>TetNet</title>
<link href='https://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>
<style>
body {
background-color: #272821;
}
.text {
color: #706C5A;
font-family: Inconsolata, Courier, monospace;
font-size: 20px;
}
#output {
float: left;
padding-left: 20%;
}
#score {
padding-left: 55%;
}
#instructions {
float: left;
position: absolute;
left: 1.5%;
bottom: 3%;
font-size: small;
line-height: 110%;
}
#signature {
float: right;
position: absolute;
right: 1.5%;
bottom: 3%;
font-size: small;
line-height: 110%;
}
a:link {
color: inherit;
}
</style>
<script src="lib/cerebrum.js"></script>
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script>
</head>
<body>
<div id="output" class="text"></div>
<div id="score" class="text"></div>
<div id="instructions" class="text"><br /><b>[Key Commands]</b><br />Load Fully Evolved Archive: [CTRL]<br />Speed Up: [E]<br />Slow Down: [D]<br />Toggle AI: [A]<br />Move Shape: [Arrow Keys]<br />Rotate Shape: [Up Arrow]<br />Drop Shape: [Down Arrow]<br />Save State: [Q]<br />Load State: [W]<br />Get Archive: [G]<br />Load Archive: [R]<br />Pick Shape: [I,O,T,S,Z,J,L]</div>
<div id="signature" class="text">Created By Idrees Hassan<br />Questions? Just ask!<br /><a href="mailto:idrees@idreesinc.com" target="_top">idrees@idreesinc.com</a></div>
<script src="./tetnet.js"></script>
<script>
$(window).keydown(function (e){
if (e.ctrlKey) {
var archiveJSON = $.ajax({
url: "./archive.json",
async: false
}).responseText;
loadArchive(archiveJSON);
alert("Archive loaded successfully!");
}
});
</script>
<script type="text/javascript">
</script>
</body>
</html>