forked from xviniette/FlappyLearning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
79 lines (77 loc) · 2.61 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
<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" href="img/bird.png" />
<title>FlapAI Bird</title>
<link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
<style>
canvas{border:2px solid #000000;}
.button {
background-color: black; /* Green */
border: none;
color: white;
padding: 8px 16px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 10px 2px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
}
.button1 {
background-color: white;
color: black;
border: 2px solid black;
}
.button1:hover {
background-color: black;
color: white;
}
p{
font-family:Oswald;
}
</style>
</head>
<body>
<center>
<h1 style="font-family:Oswald;">FlapAI Bird</h1>
<table border=0>
<tr>
<td align="center" width=500px style="vertical-align:top;">
<p id="p_score"></p>
<p id="p_maxscore"></p>
<p id="p_distance"></p>
<p id="p_maxdistance"></p>
<p id="p_gen"></p>
<p id="p_alive"></p>
</td>
<td width=600px style="vertical-align:top;" align="center">
<canvas id="flappy" width="500" height="512" onclick="mygamestart()"></canvas> <br/>
<button class="button button1" id="Button" onclick="restart()">Restart</button>
<button class="button button1" id="x1" onclick="speed(60)">x1</button>
<button class="button button1" id="x2" onclick="speed(120)">x2</button>
<button class="button button1" id="x3" onclick="speed(180)">x3</button>
<button class="button button1" id="x5" onclick="speed(300)">x5</button>
<button class="button button1" id="MAX" onclick="speed(0)">MAX</button>
<button class="button button1" id="cui" onclick="changeUI()">Change UI</button>
</td>
<td width=500px style="vertical-align:top;">
<table id="genscore" border=0 style="font-family:Oswald;">
<tr>
<td vlaign="top" align="center" width=500px>Generation Number</td>
<td vlaign="top" align="center" width=500px>Score</td>
<td vlaign="top" align="center" width=500px>Distance</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
<p id="temp"></p>
</center>
<script src = "Neuroevolution.js"></script>
<script src = "game.js"></script>
</body>
</html>