-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
146 lines (143 loc) · 5.11 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
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="prax3.css">
<link rel="icon" href="favicon.ico">
<script type="text/javascript" src="prax3.js"></script>
<title>Memory Game</title>
</head>
<body onload="generateGameField(); loadGameData()">
<h1 class="logo">MEMORY GAME</h1>
<hr>
<div class="game-options-menu">
<form name="presets" method="POST">
<input oninput="validatePlayerName()" id="player-name" type="text" placeholder="Enter your name" name="player-name">
<br>
<label for="game-mode">The pair of cards has:</label>
<select name="game-mode" id="game-mode" onchange="changeBoardSize()">
<option value="same-value">Same value</option>
<option value="same-suit-and-value">Same suit and value</option>
</select>
<label for="board-size">Number of cards to play with:</label>
<select name="board-size" id="board-size">
<option value="6">6</option>
<option value="16">16</option>
<option value="26">26</option>
</select>
<br>
<button type="button" onclick="startGame()" id="play-button">Play</button>
<button type="button" onclick="clearGameField()" id="clear-button">Clear</button>
</form>
</div>
<div id="game-field-wrapper">
<div class="details">
<p>Time Passed: <span id="timer">0</span></p>
<p>Current Score: <span id="score">0</span></p>
</div>
<div class="game-field">
<div id="game-stats-popup">
<p>You did it!</p>
<p>Your Final Score: <span id="game-stats-score">0</span></p>
<p>Time Taken: <span id="game-stats-time">0</span></p>
</div>
<table id="board"></table>
</div>
</div>
<div class="wrapper">
<div>
<h3>Scores History</h3>
<input type="text" placeholder="Filter By Player Name" id="filter-bar" oninput="filterByPlayer()">
</div>
<div class="statistics">
<table id="stats">
<thead>
<tr class="headers">
<th>№</th>
<th>Player Name</th>
<th>Mode | Cards</th>
<th class="sortable" onclick="sortTable('score')" style="cursor: pointer;">Score</th>
<th class="sortable" onclick="sortTable('time')" style="cursor: pointer">Time taken</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>2</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>3</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>4</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>5</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>6</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>7</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>8</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>9</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>10</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
</div>
</div>
<footer>
<p>This memory game was created by Alexander Frolov, 186076IAIB</p>
</footer>
</body>
</html>