-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
132 lines (120 loc) · 5.78 KB
/
index.html
File metadata and controls
132 lines (120 loc) · 5.78 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
122
123
124
125
126
127
128
129
130
131
132
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Associated links for styles/fonts & frameworks -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Raleway|Rock+Salt&display=swap" rel="stylesheet">
<script src="https://kit.fontawesome.com/cb5978f41d.js" crossorigin="anonymous"></script>
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon/favicon-16x16.png">
<link rel="stylesheet" href="assets/css/style.css">
<title>Memory Game</title>
</head>
<body>
<h1 class="page-title">Flip It !</h1>
<!-- Dashboard-->
<div class="dashboard wrapper">
<!-- Buttons -->
<button type="button" class="dashboard-btn btn btn-success btn-xm" id="restart" aria-label="Restart Button">
<i class="fas fa-redo-alt"><br/></i>
</button>
<button type="button" id="mute" class="dashboard-btn btn btn-success btn-xm" aria-label="Mute Button">
<i class="fas fa-volume-mute" title="mute button"></i>
</button>
<!-- Difficulty selector radio buttons -->
<div class="row difficulty-selector justify-content-center">
<div class="btn-group btn-group-xm btn-group-toggle" id="btnSel" data-toggle="buttons">
<label class="btn btn-success active buttons">
<input type="radio" name="easy" id="easy"> Easy
</label>
<label class="btn btn-success buttons">
<input type="radio" name="medium" id="medium"> Medium
</label>
<label class="btn btn-success buttons">
<input type="radio" name="hard" id="hard"> Hard
</label>
</div>
</div>
<!-- Dashboard info -->
<div class="row justify-content-around">
<div class="game-info col-6 timer">
<i class="far fa-clock"></i> Timer: <span id="minutes">00</span>:<span id="seconds">00</span>
<!-- <span class="hidden" id="countdown">90</span> -->
</div>
<div class="game-info col-6">
<i class="fas fa-dice"></i> Moves: <span id="score">0</span>
</div>
</div>
</div>
<!-- Gameboard -->
<div class="game container"></div>
<!-- User Info Modal -->
<div class="float-button" id="infoModal">
<i class="far fa-question-circle"></i><br>How to play
</div>
<div class="modal" tabindex="-1" role="dialog" id="info">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">How to play</h5>
<button type="button" class="close white" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Select the difficulty mode you want to play to start the game.
<br><br>Click on a card to flip it over and see the color on the other side, try to find the other card
that matches its color. Match all pairs to completed the game. Only two cards can be flipped at
a time.<br><br>Try to complete the game in the shortest amount of time with the least amount of moves.
<br><br>You can restart the game at any time by pressing the restart button.
<br><br>Good luck! <i class="far fa-thumbs-up"></i></p>
</div>
</div>
</div>
</div>
<!-- Win Modal-->
<div class="modal fade bd-example-modal-sm" id="winModal" tabindex="-1" role="dialog" aria-labelledby="winModal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-sm" id="win" role="document">
<div class="modal-content">
<div class="modal-header">
<h2 id="modal-title">You win!</h2>
<button type="button" class="close" id="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>You completed the game in <span id="winScore">0</span> moves.</p>
</div>
<div class="modal-footer justify-content-center">
<h5>Play Again?</h5>
<button id="refresh" type="button" class="btn btn-success btn-sm" aria-label="Reload Page Button">
<i class="fa fa-refresh"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Audio files -->
<audio id="bgMusic" src="assets/audio/background.mp3"></audio>
<audio id="cardFlipAudio" src="assets/audio/card-flip.mp3"></audio>
<audio id="correctMatchAudio" src="assets/audio/correct-match.mp3"></audio>
<audio id="buttonClickAudio" src="assets/audio/switch.mp3"></audio>
<audio id="winAudio" src="assets/audio/win-victory.mp3"></audio>
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js "
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n " crossorigin="anonymous ">
</script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js "
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo " crossorigin="anonymous ">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js "
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6 " crossorigin="anonymous ">
</script>
<!-- Custom javascript file -->
<script src="assets/js/script.js "></script>
</body>
</html>