-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
executable file
·69 lines (58 loc) · 2.7 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Minesweeper</title>
<meta name="description" content="Minesweeper game">
<!-- vendor css -->
<link rel="stylesheet" href="lib/normalize.css/normalize.css">
<link rel="stylesheet" href="lib/font-awesome/css/font-awesome.min.css">
<!-- app css -->
<link rel="stylesheet" href="css/minesweeper.min.css">
<!-- vendor js -->
<script src="lib/angular/angular.min.js"></script>
<script src="lib/lodash/dist/lodash.min.js"></script>
<!-- app js -->
<script src="js/main.js"></script>
<script src="js/directives.js"></script>
<script src="js/cell.js"></script>
<script src="js/game.js"></script>
</head>
<body ng-app="minesweeper">
<div id="container" class="no-text-select" ng-controller="MainController" ng-cloak>
<div id="stats" ng-class="{win: Game.gameWon === true, loose: Game.gameWon === false}">
<div class="counter"><i class="fa fa-bomb"></i> {{Game.minesLeft}}</div>
<div class="counter"><i class="fa fa-clock-o"></i> {{Game.timer}}</div>
<div id="new-game-btn" ng-click="Game.startNewGame()">
<i ng-if="Game.gameWon === false" class="fa fa-frown-o"></i>
<i ng-if="Game.gameWon !== false" class="fa fa-smile-o"></i>
</div>
</div>
<table id="minefield" ng-cloak>
<tr ng-repeat="row in Game.cells">
<td ng-repeat="cell in row">
<div ng-class="{open:cell.isOpen, unclickable: cell.flag === flags.Mine || Game.gameWon!==null, blown: cell.isBlown}"
ng-click="onCellClick(cell)" ng-right-click="onCellRightClick(cell)">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" shape-rendering="crispEdges"
viewBox="0 0 24 24">
<text x="12" y="20" class="svgicon" ng-bind="cell.icon"></text>
</svg>
</div>
</td>
</tr>
</table>
<div id="credits"><a href="mailto:[email protected]">Anri Asaturov</a> / <a href="https://github.com/anri-asaturov/minesweeper/">Source on Github.</a></div>
</div>
<!-- end container-->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-51100808-3', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>