-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
180 lines (147 loc) · 5.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
<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" type="image/png" href="libs/jasmine/lib/jasmine-2.2.0/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href="libs/jasmine/lib/jasmine-2.2.0/jasmine.css">
<script type="text/javascript" src="libs/jasmine/lib/jasmine-2.2.0/jasmine.js"></script>
<script type="text/javascript" src="libs/jasmine/lib/jasmine-2.2.0/jasmine-html.js"></script>
<script type="text/javascript" src="libs/jasmine/lib/jasmine-2.2.0/boot.js"></script>
<meta charset="utf-8" />
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/tile.css" rel="stylesheet">
<title>MYGAME </title>
</head>
<body>
<section id="game">
<div id="draw-game-startup" class="startup"></div>
<div id="draw-main-info"></div>
<div id="draw-tile-map"></div>
<div id="draw-tile-info"></div>
</section>
<div style="width:100%"></div>
<script id="build-game-startup" type="text/template">
<p>Hi, welcome to Island Dominator browser game SPA style</p>
<p>In the game you can build different types of buildings in areas called tiles<br/>
You can also upgrade or destroy the different buildings you have <br/>
Buildings are :
<ul>
<li>Residence : -Under Development-</li>
<li>Storage : increase your storage</li>
<li>Wood Cutter : increase your daily wood earnings</li>
<li>Mason : increase your daily stone earnings</li>
<li>Wood Swamill : increase your daily planks earnings and wood expense</li>
</ul>
</p>
<p>Please enter your name and starting conditions : </p>
Name : <input id="player-name" type="text" value="Anynomos"/>
<br/>
Starting wood : <input id="starting-wood" type="number" value="0"/>
<br/>
Starting stone : <input id="starting-stone" type="number" value="0"/>
<br/>
Starting planks : <input id="starting-planks" type="number" value="0"/>
<br/>
<a id="submit-info" class="btn btn-sucess">Submit »</a>
</script>
<script id="build-main-info" type="text/template">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Main Panel</h3>
</div>
<div class="panel-body">
<div class="mainElements">
<p>Hello , <%= name %> </p>
</div>
<div class="mainElements">
<p id="res-day"><p>Day : <%= day %> </p>
<p id="res-settlers"><p>Settlers : <%= settlers %> / <%= max_settlers %></p>
<p id="res-settlers"><p>Workers : <%= workers %> </p>
<p id="res-storage"></p><p>Storage : <%= storage %> / <%= max_storage %></p>
</div>
<div class="mainElements">
<p id="res-wood"></p><p>Wood : <%= wood %></p>
<p id="res-stone"></p><p>Stone : <%= stone %></p>
</div>
<div class="mainElements">
<p id="res-planks"></p><p>planks : <%= planks %></p>
</div>
<a id="next-day" class="btn btn-default">Next Day »</a>
</div>
</div>
</script>
<script id="build-tile-map" type="text/template">
<a href="#<%= link %>">
<p><%= name %>
<% if(name == "Empty tile") { %>
</p>
<% }else{ %>
Lvl : <%= level %></p>
<% } %>
<img id="<%= number %>" src="<%= img %>" class="tile"/>
</a>
<br/>
</script>
<script id="build-tile-info" type="text/template">
<p>Tile Number : <%= number %> , Type : <%= name %> </p>
<% if(name == "Empty tile") { %>
<p>This is an empty tile,<br/>Upgrade this tile to : </p>
<a id="upgrade-to-storage" class="btn btn-default">Storage »</a>
<a id="upgrade-to-residence" class="btn btn-default">Residence »</a>
<a id="upgrade-to-wood-cutter" class="btn btn-default">Wood Cutter »</a>
<a id="upgrade-to-wood-swamill" class="btn btn-default">Wood Sawmill »</a>
<a id="upgrade-to-mason" class="btn btn-default">Mason »</a>
<% } %>
<% if(level > 0){ %>
<p>Level : <%= level %></p>
<% } %>
<% if(require_wood > 0){ %>
<p>Consumes Wood : <%= require_wood %></p>
<% } %>
<% if(require_stone > 0){ %>
<p>Consumes Stone : <%= require_stone %></p>
<% } %>
<% if(produce_wood > 0){ %>
<p>Produce Wood : <%= produce_wood %></p>
<% } %>
<% if(produce_planks > 0){ %>
<p>Produce Planks : <%= produce_planks %></p>
<% } %>
<% if(produce_stone > 0){ %>
<p>Produce Stone : <%= produce_stone %></p>
<% } %>
<% if(max_storage > 0){ %>
<p>Provide Storage : <%= max_storage %></p>
<% } %>
<% if(max_settlers > 0){ %>
<p>Provide Housing : <%= max_settlers %></p>
<% } %>
<% if(cost_workers > 0){ %>
<p>Required Workers : <%= cost_workers %></p>
<% } %>
<% if(cost_wood > 0 && level <10){ %>
<p>Wood to upgrade : <%= cost_wood %></p>
<% } %>
<% if(cost_stone > 0 && level <10){ %>
<p>Stone to upgrade : <%= cost_stone %></p>
<% } %>
<% if(cost_planks > 0 && level <10){ %>
<p>Planks to upgrade : <%= cost_planks %></p>
<% } %>
<% if(name != "Empty tile") { %>
<% if(level < 10){ %>
<a id="upgrade" class="btn btn-default">Upgrade »</a>
<% } %>
<a id="destroy" class="btn btn-danger">Destroy »</a>
<% } %>
</script>
<script src="lib/jquery-1.9.0.js"></script>
<script src="lib/jquery-ui-1.10.0.custom.js"></script>
<script src="lib/jquery-dateFormat-1.0.js"></script>
<script src="lib/underscore.js"></script>
<script src="lib/backbone.js"></script>
<script src="dist/js/SPA_Game.min.js"></script>
<script src="assets/js/views/selectedTile.js"></script> <!-- there is an error if I uglify this with grunt -->
<script src="assets/js/main.js"></script>
<script src="assets/js/mainTest.js"></script>
</body>
</html>