-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·39 lines (36 loc) · 1.55 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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.16/angular.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="script.js"></script>
</head>
<body>
<div ng-app="tetrisApp">
<div ng-controller="TetrisCtrl">
<div class="grid" style="width:{{size*cols}}px; height:{{size*rows}}px">
<div ng-repeat="row in cells | reverse" style="height:{{size}}px">
<span ng-repeat="col in row" class="empty" ng-class="col.class_name" style="top:{{$parent.$index*size}}px; left:{{$index*size}}px; width:{{size}}px; height:{{size}}px" ng-style="col.style" ng-keyup>{{col.y}}</span>
</div>
<div class="msg" ng-if="show_msg"><p>{{msg}}</p></div>
</div>
<div class="panel">
<div class="next">
<div ng-repeat="row in next_figure" style="height:{{size}}px">
<span ng-repeat="col in row" ng-class="col.class_name" style="width:{{size}}px; height:{{size}}px"></span>
</div>
</div>
<div class="stats">
<table>
<tr><td>level:</td><td>{{level}}</td></tr>
<tr><td>score:</td><td>{{score}}</td></tr>
<tr><td>lines:</td><td>{{lines}}</td></tr>
</table>
</div>
<div class="new_game" ng-click="new_game()">new game</div>
</div>
</div>
</div>
</body>
</html>