-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
222 lines (219 loc) · 12 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title id="title">Pet Caring Game</title>
<link rel="stylesheet" href="style.css">
<script src="sw.js"></script>
<script src="script.js" defer></script>
<meta name="description" content="Take care of your chosen pet and make sure it's happy and healthy.">
<meta name="keywords" content="pet, caring, game, happy, healthy">
<meta name="author" content="Pet Caring Game">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap">
<meta name="og:title" content="Pet Caring Game">
<meta name="og:description" content="Take care of your chosen pet and make sure it's happy and healthy.">
<meta name="og:url" content="https://pet-caring-game.vercel.app/">
<link rel="icon" type="image/png" href="screenshots/panda.png">
</head>
<body onload="initializeGame()" id="dropzone">
<div id="drop" style="display: none;">
<button onclick="closedrop()">Close</button>
<h1>Drop the file to load a saved game</h1>
</div>
<noscript>This site requires JavaScript to be enabled.</noscript>
<div id="tutorial">
<h1>Pet Caring Game</h1>
<p>Take care of your chosen pet and make sure it's happy and healthy.</p>
<button onclick="startGame()">Start</button>
</div>
<div id="choosepet">
<h1>Choose your pet</h1>
<div id="petoptions">
<div id="page1">
<h1>Page 1</h1>
<div id="row1">
<button id="dog" aria-label="Select a dog">🐶</button>
<button id="cat" aria-label="Select a cat">🐱</button>
<button id="rabbit" aria-label="Select a rabbit">🐰</button>
</div>
<div id="row2">
<button id="hamster" aria-label="Select a hamster">🐹</button>
<button id="bird" aria-label="Select a bird">🐦</button>
<button id="duck" aria-label="Select a duck">🦆</button>
</div>
<div id="row3">
<button id="fish" aria-label="Select a fish">🐠</button>
<button id="turtle" aria-label="Select a turtle">🐢</button>
<button id="lizard" aria-label="Select a lizard">🦎</button>
</div>
<div id="row4">
<button id="snake" aria-label="Select a snake">🐍</button>
<button id="pig" aria-label="Select a pig">🐷</button>
<button id="cow" aria-label="Select a cow">🐮</button>
</div>
<div id="row5">
<button id="horse" aria-label="Select a horse">🐴</button>
<button id="sheep" aria-label="Select a sheep">🐑</button>
<button id="dragon" aria-label="Select a dragon">🐲</button>
</div>
</div>
<div id="page2" style="display:none;">
<h1>Page 2</h1>
<div id="row6">
<button id="monkey" aria-label="Select a monkey">🐵</button>
<button id="panda" aria-label="Select a panda">🐼</button>
<button id="koala" aria-label="Select a koala">🐨</button>
</div>
<div id="row7">
<button id="tiger" aria-label="Select a tiger">🐯</button>
<button id="lion" aria-label="Select a lion">🦁</button>
<button id="bear" aria-label="Select a bear">🐻</button>
</div>
<div id="row8">
<button id="elephant" aria-label="Select an elephant">🐘</button>
<button id="rhino" aria-label="Select a rhino">🦏</button>
<button id="hippo" aria-label="Select a hippo">🦛</button>
</div>
<div id="row9">
<button id="crocodile" aria-label="Select a crocodile">🐊</button>
<button id="penguin" aria-label="Select a penguin">🐧</button>
<button id="octopus" aria-label="Select an octopus">🐙</button>
</div>
<div id="row10">
<button id="shark" aria-label="Select a shark">🦈</button>
<button id="whale" aria-label="Select a whale">🐋</button>
<button id="dolphin" aria-label="Select a dolphin">🐬</button>
</div>
</div>
<div id="page3" style="display:none;">
<h1>Page 3</h1>
<div id="row11">
<button id="unicorn" aria-label="Select a unicorn">🦄</button>
<button id="frog" aria-label="Select a frog">🐸</button>
<button id="seal" aria-label="Select a seal">🦭</button>
</div>
<div id="row12">
<button id="deer" aria-label="Select a deer">🦌</button>
<button id="antelope" aria-label="Select an antelope">🦌</button>
<button id="kangaroo" aria-label="Select a kangaroo">🦘</button>
</div>
<div id="row13">
<button id="bat" aria-label="Select a bat">🦇</button>
<button id="owl" aria-label="Select an owl">🦉</button>
<button id="eagle" aria-label="Select an eagle">🦅</button>
</div>
<div id="row14">
<button id="parrot" aria-label="Select a parrot">🦜</button>
<button id="peacock" aria-label="Select a peacock">🦚</button>
<button id="flamingo" aria-label="Select a flamingo">🦩</button>
</div>
<div id="row15">
<button id="swan" aria-label="Select a swan">🦢</button>
<button id="turkey" aria-label="Select a turkey">🦃</button>
<button id="chicken" aria-label="Select a chicken">🐔</button>
</div>
</div>
<div id="page4" style="display:none;">
<h1>Page 4</h1>
<div id="row16">
<button id="rooster" aria-label="Select a rooster">🐓</button>
<button id="fox" aria-label="Select a fox">🦊</button>
<button id="crow" aria-label="Select a crow">🦅</button>
</div>
<div id="row17">
<button id="butterfly" aria-label="Select a butterfly">🦋</button>
<button id="jellyfish" aria-label="Select a jellyfish">🪼</button>
<button id="crab" aria-label="Select a crab">🦀</button>
</div>
<div id="row18">
<button id="lobster" aria-label="Select a lobster">🦞</button>
<button id="shrimp" aria-label="Select a shrimp">🦐</button>
<button id="squid" aria-label="Select a squid">🦑</button>
</div>
<div id="row19">
<button id="snail" aria-label="Select a snail">🐌</button>
<button id="bee" aria-label="Select a bee">🐝</button>
<button id="ladybug" aria-label="Select a ladybug">🐞</button>
</div>
<div id="row20">
<button id="ant" aria-label="Select an ant">🐜</button>
<button id="spider" aria-label="Select a spider">🕷️</button>
<button id="scorpion" aria-label="Select a scorpion">🦂</button>
</div>
</div>
<div id="page5" style="display:none;">
<h1>Page 5</h1>
<div id="row21">
<button id="grasshopper" aria-label="Select a grasshopper">🦗</button>
<button id="beetle" aria-label="Select a beetle">🪲</button>
<button id="raccoon" aria-label="Select a raccoon">🦝</button>
</div>
<div id="row22">
<button id="wolf" aria-label="Select a wolf">🐺</button>
<button id="polarbear" aria-label="Select a polar bear">🐻❄️</button>
<button id="chick" aria-label="Select a chick">🐥</button>
</div>
<div id="row23">
<button id="dove" aria-label="Select a dove">🕊️</button>
<button id="tropicalfish" aria-label="Select a tropical fish">🐠</button>
<button id="blowfish" aria-label="Select a blowfish">🐡</button>
</div>
<div id="row24">
<button id="goose" aria-label="Select a goose">🪿</button>
<button id="mouse" aria-label="Select a mouse">🐭</button>
<button id="rat" aria-label="Select a rat">🐀</button>
</div>
<div id="row25">
<button id="hedgehog" aria-label="Select a hedgehog">🦔</button>
<button id="black_cat" aria-label="Select a black cat">🐈⬛</button>
<button id="black_bird" aria-label="Select a black bird">🐦⬛</button>
</div>
</div>
<div id="page6" style="display:none;">
<h1>Page 6</h1>
<div id="row26">
<button id="gorilla" aria-label="Select a gorilla">🦍</button>
<button id="orangutan" aria-label="Select a orangutan">🦧</button>
<button id="sloth" aria-label="Select a sloth">🦥</button>
</div>
<div id="row27">
<button id="otter" aria-label="Select a otter">🦦</button>
<button id="beaver" aria-label="Select a beaver">🦫</button>
<button id="badger" aria-label="Select a badger">🦡</button>
</div>
<div id="row28">
<button id="donkey" aria-label="Select a donkey">🫏</button>
<button id="bison" aria-label="Select a bison">🦬</button>
</div>
</div>
</div>
<br>
<button onclick="showMore()" title="Show more" aria-label="Show more">➡️</button>
<button onclick="randomPet()" title="Random" aria-label="Random">🎲</button>
</div>
</div>
<div id="game">
<div id="pet">
<div id="petstats">
<div id="happiness">Happiness: <progress id="happinessvalue" value="50" max="100"></progress></div>
<div id="hunger">Hunger: <progress id="hungervalue" value="50" max="100"></progress></div>
<div id="hydration">Hydration: <progress id="hydrationvalue" value="50" max="100"></progress></div>
<div id="cleanliness">Cleanliness: <progress id="cleanlinessvalue" value="50" max="100"></progress>
</div>
</div>
</div>
<div id="petimage"></div>
<div id="actions">
<button onclick="feed()" id="feed" title="Feed" aria-label="Feed your pet">Feed</button>
<button onclick="giveDrink()" id="drink" title="Drink" aria-label="Give your pet a drink">💧</button>
<button onclick="play()" id="play" title="Play" aria-label="Play with your pet">😆</button>
<button onclick="clean()" id="clean" title="Clean" aria-label="Bathe your pet">🚿</button>
<button onclick="saveGame()" id="save" title="Save your game" aria-label="Save your game">💾</button>
<button onclick="loadGame()" id="load" title="Load a saved game file"
aria-label="Load a saved game file">📂</button>
<button onclick="resetGame()" id="reset" title="Reset your game" aria-label="Reset your game">🔄</button>
</div>
</div>
</body>
</html>