forked from gh-connect-day/flappy-bird-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
121 lines (106 loc) · 2.85 KB
/
index.html
File metadata and controls
121 lines (106 loc) · 2.85 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flappy Bird - Build Your Own Game!</title>
<style>
body {
margin: 0;
padding: 20px;
background-color: #70c5ce;
font-family: 'Arial', sans-serif;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
}
h1 {
color: #fff;
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
margin-bottom: 20px;
font-size: 2.5em;
}
#gameContainer {
display: flex;
gap: 20px;
align-items: flex-start;
}
#canvas {
border: 3px solid #fff;
border-radius: 10px;
box-shadow: 0 8px 16px rgba(0,0,0,0.3);
background-color: #70c5ce;
}
#scorePanel {
background-color: rgba(255,255,255,0.9);
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
width: 200px;
}
#scoreList {
list-style-type: none;
padding: 0;
margin: 0;
font-family: 'Courier New', monospace;
}
#currentScore {
font-weight: bold;
font-size: 18px;
color: #2c3e50;
margin-bottom: 15px;
padding: 10px;
background-color: #f39c12;
border-radius: 5px;
text-align: center;
color: white;
}
#scoreList li:nth-child(2) {
font-weight: bold;
margin: 15px 0 10px 0;
color: #34495e;
}
#previousScores {
color: #7f8c8d;
line-height: 1.6;
}
.instructions {
background-color: rgba(255,255,255,0.9);
padding: 15px;
border-radius: 10px;
margin-top: 20px;
max-width: 500px;
text-align: center;
}
.instructions h3 {
margin-top: 0;
color: #2c3e50;
}
.instructions p {
margin: 5px 0;
color: #34495e;
}
</style>
</head>
<body>
<h1>🐦 Flappy Bird Challenge</h1>
<div id="gameContainer">
<canvas id="canvas" width="288" height="552"></canvas>
<div id="scorePanel">
<ul id="scoreList">
<li id="currentScore">Current Score: 0</li>
<li>Previous Scores:</li>
<li id="previousScores">No games played yet</li>
</ul>
</div>
</div>
<div class="instructions">
<h3>🎮 How to Play</h3>
<p><strong>ESC</strong> - Start game / Restart after game over</p>
<p><strong>Any Key</strong> - Make the bird flap (during gameplay)</p>
<p><em>Build the game logic to make it playable!</em></p>
</div>
<script src="flappyBird.js"></script>
</body>
</html>