forked from kipelovets/tetris
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
187 lines (177 loc) · 7.63 KB
/
index.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<html>
<head>
<title>
Cowtris
</title>
<link rel="stylesheet" type="text/css" href="resources/styles/main.css">
<link rel="stylesheet" type="text/css" href="resources/vendor/bootstrap/css/bootstrap.css">
</head>
<body>
<header>
<h1>Cowtris</h1>
<h3>a falling block game... with cows!</h3>
</header>
<div id="menu">
<ul class="nav nav-pills">
<li class="dropdown">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="#" id="newGameAction">New Game</a>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" href="#" id="pauseAction">Pause Game</a>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" href="#">End Game</a>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" href="#highScoreModal" role="button" data-toggle="modal">High Scores</a>
</li>
<li>
<a href="#optionsModal" role="button" data-toggle="modal">Options</a>
</li>
</ul>
</div>
<div id="optionsModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="optionsModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="optionsModalLabel">
Game Options
</h3>
</div>
<div class="modal-body">
<p>
<form>
<label for="StartingLevel">Starting Level</label>
<select name="StartingLevel" id="startingLevel">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
</select>
<label for="StartingRows">Starting Rows</label>
<select name="StartingRows" id="startingRows">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</form>
</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Ok</button>
</div>
</div>
<div id="highScoreModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="highScoreModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="highScoreModalLabel">
High Scores
</h3>
</div>
<div class="modal-body">
<table class="table table-condensed">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Score</th>
<th>Rows</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>
<div class="overlays">
<div id="game_over" class="message">
game over
</div>
<div id="paused" class="message">
paused
</div>
</div>
<div id="container">
<div id="left">
<canvas id="game_canvas" width="200" height="440"></canvas>
</div>
<div id="right">
<img id="title" src="./resources/images/title.png">
<div id="info_container">
<table>
<tr>
<td>
Score
</td>
<td id="score">
0
</td>
</tr>
<tr>
<td>
Rows
</td>
<td id="rows">
0
</td>
</tr>
<tr>
<td>
Level
</td>
<td id="level">
1
</td>
</tr>
<tr>
<td>
Next
</td>
<td id="next">
<canvas id="preview" width="84" height="52"></canvas><br>
<span id="preview_name"></span>
</td>
</tr>
</table>
</div>
</div>
</div>
</section>
<footer>
<p>Confused? <a href="http://blog.benbybenjacobs.com/cowtris.html">A little history</a>.</p>
<p>This version of Cowtris is by <a href="https://github.com/benmj">benmj</a> with contributions from <a href="http://github.com/davisagli">davisagli</a></p>
</footer>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-34233094-2");
pageTracker._trackPageview();
} catch(err) {}
</script>
</div>
</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="resources/vendor/jquery.timer.js"></script>
<script type="text/javascript" src="resources/vendor/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="resources/js/cowtris.js"></script>
<script type="text/javascript" src="resources/js/selectors.js"></script>
<audio id="audio_madcow" src="resources/sounds/madcow.wav" preload="auto">
<audio id="audio_row" src="resources/sounds/Zap.wav" preload="auto">
<audio id="audio_multirow" src="resources/sounds/Zap2.wav" preload="auto">
<audio id="audio_gameover" src="resources/sounds/Die.wav" preload="auto">
</body>
</html>