Repository navigation
Expand file tree
/
Copy pathEcoGame.html
More file actions
131 lines (125 loc) · 4.93 KB
/
Copy pathEcoGame.html
File metadata and controls
131 lines (125 loc) · 4.93 KB
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
<!DOCTYPE html>
<html>
<head>
<title>EcoGame</title>
<meta charset="utf-8"/>
<link rel="stylesheet" href="Data/Styles.css">
<script src="JavaScript/Holder.js"></script>
<script src="JavaScript/Styler.js"></script>
<script src="JavaScript/Starter.js"></script>
<script src="JavaScript/Controller.js"></script>
<!-- This is a comment. -->
<!-- The lines above are used to load the JavaScript and CSS. -->
<!-- Do not load JavaScript modules including functions with the same name. -->
</head>
<body>
<style>
body {
background-image: url('https://png.pngtree.com/background/20230401/original/pngtree-trees-forest-tree-background-picture-image_2251659.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
</style>
<h1>
EcoGame
<button onclick="ChangeMode(true)">
<img class="image1" src="Pictures/Dark.jpg" alt="Dark">
</button>
<button onclick="ChangeMode(false)">
<img class="image1" src="Pictures/Light.jpg" alt="Light">
</button>
<a href="Data/About.html" target="_blank">
<img class="image1" src="Pictures/About.jpg" alt="About">
</a>
</h1>
<div>
<h2 id="best_score">Survived till turn: 0</h2>
<h2 id="turn_line">Turn 0</h2>
<p><button onclick="NextTurn()">Next turn</button></p>
<p><img src="Pictures/Planet.jpg" alt=""></p>
</div>
<h3 id="money_line">Money: 10</h3>
<h4 id="game_over"> </h4>
<table>
<tr>
<td>
<h3>People</h3>
<p><a href="Data/Pedia/People.html" target="_blank">Info</a></p>
<h4>You have:</h4>
<p id="people_line">People: 10</p>
<p id="army_line">Police: 0</p>
<h4>To recruit:</h4>
<p id="army_buying">1</p>
<p>
<button onclick="BuyLessArmy()">-</button>
<button onclick="BuyMoreArmy()">+</button>
</p>
<p>
<input type="text" id="buy_army_change">
<button onclick="BuyArmySet()">Set</button>
</p>
<p><button onclick="BuyArmy()">Recruit policemen</button></p>
</td>
<td>
<h3>Trees</h3>
<p><a href="Data/Pedia/Trees.html" target="_blank">Info</a></p>
<h4>You have:</h4>
<p id="trees_line">Adult trees: 0</p>
<p id="small_trees_line">Small trees: 0</p>
<p id="seeds_line">Seeds: 0</p>
<p id="seeds_cost">Seed cost: 10</p>
<h4>To buy:</h4>
<p id="trees_buying">1</p>
<p>
<button onclick="BuyLessTrees()">-</button>
<button onclick="BuyMoreTrees()">+</button>
</p>
<p>
<input type="text" id="buy_trees_change">
<button onclick="BuyTreesSet()">Set</button>
</p>
<p><button onclick="BuyTrees()">Buy trees</button></p>
</td>
<td>
<h3>Pollution</h3>
<p><a href="Data/Pedia/Pollution.html" target="_blank">Info</a></p>
<h4>You have:</h4>
<p id="pollution_line">Pollution: 0</p>
<p id="pollution_cleaners_line">Pollution cleaners: 0</p>
<p id="pollution_cost">Pollution cleaner cost: 15</p>
<h4>To buy:</h4>
<p id="pollution_buying">1</p>
<p>
<button onclick="BuyLessPollution()">-</button>
<button onclick="BuyMorePollution()">+</button>
</p>
<p>
<input type="text" id="buy_pollution_change">
<button onclick="BuyPollutionSet()">Set</button>
</p>
<p><button onclick="BuyPollution()">Buy pollution cleners</button></p>
</td>
<td>
<h3>Factory</h3>
<p><a href="Data/Pedia/Factory.html" target="_blank">Info</a></p>
<h4>You have:</h4>
<p id="factory_line">Factory: 0</p>
<p id="factory_cost">Factory cost: 15</p>
<h4>To buy:</h4>
<p id="factory_buying">1</p>
<p>
<button onclick="BuyLessFactory()">-</button>
<button onclick="BuyMoreFactory()">+</button>
</p>
<p>
<input type="text" id="buy_factory_change">
<button onclick="BuyFactorySet()">Set</button>
</p>
<p><button onclick="BuyFactory()">Buy factory</button></p>
</td>
</tr>
</table>
<p id="comment"></p>
</body>
</html>