-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
49 lines (49 loc) · 2.26 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
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Minesweeper</title>
<meta name="description" content="Minesweeper dawg">
<meta name="viewport" content="initial-scale=1.0, width=device-width">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css">
<link rel="stylesheet" href="css/main.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.js"></script>
<script src="js/app.js"></script>
</head>
<body ng-app="minesweeper">
<div id="wrapper" ng-controller="GameController as vm">
<h1 id="title">Minesweeper</h1>
<div id="container">
<div id="grid">
<table>
<tbody>
<tr ng-repeat="row in vm.grid track by $index">
<td class="tile"
ng-repeat="square in row track by $index"
ng-class="{
'uncovered': square.visited,
'covered': !square.visited,
'mine': square.mine,
'zero': square.val === 0,
'one': square.val === 1,
'two': square.val === 2,
'three': square.val === 3,
'four': square.val === 4,
'five': square.val === 5
}"
ng-click="vm.clickSquare(square)">
<span>{{square.val}}</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<button ng-click="vm.newGame()">New Game</button>
</div>
</div>
<script src="js/services.js"></script>
<script src="js/controllers.js"></script>
</body>
</html>