-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.html
More file actions
85 lines (83 loc) · 3.8 KB
/
game.html
File metadata and controls
85 lines (83 loc) · 3.8 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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<meta charset="UTF-8">
<link href="main.css" rel="stylesheet">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tetris Game</title>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script src="https://kit.fontawesome.com/81ac83e5bf.js" crossorigin="anonymous"></script>
<audio id="sound">
<source src="Audio/game.wav" type="audio/wav">
</audio>
<audio id="sound1">
<source src="Audio/lock.wav" type="audio/wav">
</audio>
<div class="score row">
<center>
<div class="gameOver">
<h1
style="font-size: xx-large;font-family: Verdana, Geneva, Tahoma, sans-serif;font-weight: 600;color:white;">
Game Over!!</h1>
<div
style="font-size: x-large;font-family: Verdana, Geneva, Tahoma, sans-serif;font-weight: 600;color:white;">
Score:<span id="score1" class="col"
style="font-size: x-large;font-family: Verdana, Geneva, Tahoma, sans-serif;font-weight: 600;"></span>
</div>
<button id="play_again" type="button" class="btn btn-primary">Play Again</button>
<button id="finish" type="button" class="btn btn-danger">Finish</button>
</div>
</center>
<center>
<div class="col-6">
<div style="font-size: xx-large;font-family: Verdana, Geneva, Tahoma, sans-serif;font-weight: 600;color: aliceblue;" id="sc">
Score : <span id="score" class="col"
style="font-size: xx-large;font-family: Verdana, Geneva, Tahoma, sans-serif;font-weight: 600;color: aliceblue;">0</span>
<button style="color: black;" id="v1"><i class="fas fa-volume-up"></i></button>
<button style="color: black;" id="v2"><i class="fas fa-volume-mute"></i></button>
</div>
</center>
</div>
</div>
<div class="row">
<center><canvas id="canvas" height="500px" width="250px" style="border:5px solid rgb(231, 231, 236);"></canvas> </center>
</div>
<br>
<div class="row">
<div class="col">
<div class="row" id="btns">
<center>
<img src="Images/left.png" id="left">
<img src="Images/right.png" id="right">
<img src="Images/down.png" id="down">
<img src="Images/rotate.png" id="rotate">
</center>
</div>
</div>
</div>
<br>
<div class="row">
<center>
<input type="range" class="form-range" min="1" max="5" step="0.5" id="speed" value=1>
<span id="sp_num"
style="font-size: x-large;font-family: Verdana, Geneva, Tahoma, sans-serif;font-weight: 300;color: aliceblue;"></span>
</div>
</center>
</div>
<div class="row">
<center>
<button type="button" id="change_speed" class="btn btn-warning" style="width:150px;font-size:medium;color: aliceblue;">Change
Speed</button>
</center>
</div>
<script src="tetrominos_shape.js"></script>
<script src="tetris_heart.js"></script>
</body>
</html>