-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.php
63 lines (54 loc) · 2.07 KB
/
Game.php
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
<?php
include_once('CommonPhp/GameCommon.php');
OutputHtmlHead();
OutputNav()
?>
<script type="module" src=" //cdn.jsdelivr.net/npm/phaser@3.24.1/dist/phaser.js"></script>
<script type="module" src="src/bootGame.js"></script>
<script type="module" src="src/Menu.js"></script>
<script type="module" src="src/Numbers.js"></script>
<script type="module" src="src/Words.js"></script>
<script type="module" src="src/gameConfig.js"></script>
<!-- level progress visualiser -->
<div id="progressContainer">
<div id="levelProg">
<div id="level1">Level 1</div>
<div id="level2">Level 2</div>
<div id="level3">Level 3</div>
<div id="level4">Level 4</div>
<div id="level5">Level 5</div>
<div id="level6">Level 6</div>
<div id="level7">Level 7</div>
</div>
</div>
<!-- randomElm displays current random element -->
<h1 id="randomElem"></h1>
<!-- input field used to let user input their guess -->
<input id="userInput" type=" text " placeholder="Enter here" />
<!-- progress bar used as timer -->
<div id="BarContainer">
<div id="myProgress">
<div id="myBar"></div>
</div>
</div>
<!-- GameOver screen shows when game ends -->
<div id="GameOver">
<div id="Overtxt" style="color: red; font-size: 40px;text-shadow: 0 10px 10px black;"><b>Game Over</b></div>
<div id="levelend" style="color: brown; font-size: 30px;text-shadow: 0 10px 10px black;">Level Reached:
</div>
<div id="scoreend" style="color: brown; font-size: 30px;text-shadow: 0 10px 10px black;">Highest Score:
</div>
<button id="retry">Try Again</button>
</div>
<!-- GameWon shows if user reaches final level -->
<div id="GameWon">
<div id="Overtxt2" style="color: green; font-size: 40px;text-shadow: 0 10px 10px black;"><b>You Win</b></div>
<div id="levelend2" style="color: brown; font-size: 30px;text-shadow: 0 10px 10px black;">Level Reached:
</div>
<div id="scoreend2" style="color: brown; font-size: 30px;text-shadow: 0 10px 10px black;">Highest Score:
</div>
<button id="retry2">Try Again</button>
</div>
<?php
Outputfooter()
?>