forked from prakhar05/GameOfAmazons
-
Notifications
You must be signed in to change notification settings - Fork 2
/
game.min.html
145 lines (132 loc) · 5.43 KB
/
game.min.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
<!DOCTYPE html>
<html lang="en" ng-app="myApp" ng-strict-di manifest="game.appcache">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Game of the Amazons</title>
<meta name="description" content="Game of the Amazons">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js"></script>
<!-- For the game rules/instructions, I use carousel from Angular UI + Bootstrap -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular-touch.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.1/ui-bootstrap-tpls.min.js"></script>
<script src="dist/everything.min.js"></script>
<script>window.angularTranslationLanguages = ['en', 'zh'];</script>
<script src="http://yoav-zibin.github.io/emulator/dist/turnBasedServices.2.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://yoav-zibin.github.io/emulator/main.css">
<link rel="stylesheet" type="text/css" href="game.css">
</head>
<body ng-cloak ng-controller="Ctrl">
<div style="position:absolute; bottom:5px; left: 5px; z-index:10;">
<span ng-click="isHelpModalShown = true"
class="glyphicon glyphicon-question-sign" aria-hidden="true"></span>
</div>
<div class="overlayModal" ng-class="{zeroOpacity: !isHelpModalShown, oneOpacity: isHelpModalShown}" aria-hidden="true">
<div class="modal-backdrop in"></div>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" ng-click="isHelpModalShown = false" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">
{{ 'RULES_OF_AMAZONS' | translate }}
</h4>
</div>
<div class="modal-body">
<carousel style="height: 200px">
<slide>
<table>
<tr>
<td>
{{ 'RULES_SLIDE0' | translate }}
</td>
<td>
<img src="imgs/HelpSlide0.png" style="height:48%;">
</td>
</tr>
</table>
</slide>
<slide>
<table>
<tr>
<td>
{{ 'RULES_SLIDE1' | translate }}
</td>
<td>
<img src="imgs/HelpSlide1.png" style="height:48%;">
</td>
</tr>
</table>
</slide>
<slide>
<table>
<tr>
<td>
{{ 'RULES_SLIDE2' | translate }}
</td>
<td>
<img src="imgs/HelpSlide2.png" style="height:48%;">
</td>
</tr>
</table>
</slide>
<slide>
<table>
<tr>
<td>
{{ 'RULES_SLIDE3' | translate }}
</td>
<td>
<img src="imgs/HelpSlide3.png" style="height:48%;">
</td>
</tr>
</table>
</slide>
<slide>
<table>
<tr>
<td>
{{ 'RULES_SLIDE4' | translate }}
</td>
<td>
<img src="imgs/HelpSlide4.png" style="height:48%;">
</td>
</tr>
</table>
</slide>
</carousel>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" ng-click="isHelpModalShown = false">
{{ 'CLOSE' | translate }}
</button>
</div>
</div>
</div>
</div>
<div id="gameArea" ng-class='{table:true}'>
<svg id="{{'pieceX_drag'}}" width="10%" height="10%"
style="display:none; position:absolute; z-index: 31;">
<circle cx="50%" cy="50%" r="20%" stroke="black" stroke-width="1%" fill="black" />
</svg>
<div ng-repeat="row in rows"
style="position:absolute; top:{{row * 10}}%; left:0; width:100%; height:10%;">
<div ng-repeat="col in cols"
style="position:absolute; top:0; left:{{col * 10}}%; width:10%; height:100%;"
id="{{'div_' + row + 'x' + col}}"
ng-class="{o:row%2===col%2, e:row%2!==col%2}">
<img src="imgs/QW.png" ng-class="{pawnWselect:isWTurn(), pawnTurn:isSelected(row, col)}"
style="width: 100%; height: 100%; position: absolute"
ng-show="isPawn(row, col,'A')" id="{{'pieceA_' + row + 'x' + col}}"/>
<img src="imgs/QB.png" ng-class="{pawnWselect:isBTurn(), pawnTurn:isSelected(row, col)}"
style="width: 100%; height: 100%; position: absolute"
ng-show="isPawn(row, col,'B')" id="{{'pieceB_' + row + 'x' + col}}"/>
<svg id="{{'pieceX_' + row + 'x' + col}}" width="100%" height="100%"
style="position:absolute;" ng-show="isPawn(row, col,'X')" ng-class="{arrow:true}">
<circle cx="50%" cy="50%" r="20%" stroke="black" stroke-width="1%" fill="black" />
</svg>
</div>
</div>
</div>
</body>
</html>