-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
93 lines (88 loc) · 4.48 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minesweeper</title>
<link rel="stylesheet" href="style.css">
<link id="favicon" rel="icon" href="assets/favicons/favicon.svg">
</head>
<body id="body">
<div id="Display">
<p id="Tip" style="margin: 0; font-size: 12pt; color:rgb(140, 140, 140)" >Tip: Click on <span style="font-weight: 800;" id="TipDifficulty"></span>, to restart the game</p>
<div id="TopBar">
<div id="MinesLayer" class="BottomLayer">
<span class="Icons">💣</span>
<span id="MineCounter" class="Counters">10</span>
</div>
<span id="Status" onclick="statusClick(this)">Minesweeper</span>
<div id="TimeLayer" class="BottomLayer">
<span class="Icons">⏱</span>
<span id="TimeCounter" class="Counters">0</span>
</div>
<p id="DifficultyBar" onpointerenter="showRestartButton(this)" onpointerleave="returnDifficulty(this)" onclick="reloadPage()" style="font-size: 18pt; margin: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;"></p>
</div>
<div id="Field">
<p id="loadingText" style="font-size: 24pt; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;">generating mines...</p>
<table id="FieldTable">
</table>
</div>
<fieldset>
<legend>Settings</legend>
<div>
<input type="checkbox" checked id="OpeningCheckbox" onclick="isOpeningEnabledSwitch(this)">
<label>Opening</label>
</div>
<div>
<input type="checkbox" checked id="AnimationsCheckbox" onclick="isAnimationsEnabledSwitch(this)">
<label>Animations</label>
</div>
<div>
<input type="checkbox" checked id="BackgroundCheckbox" onclick="isDynamicBackgroundEnabledSwitch(this)">
<label>Dynamic background</label>
</div>
<div>
<input type="checkbox" id="MuteCheckbox" onclick="isSoundMutedSwitch(this)">
<label>Mute sounds</label>
</div>
<button id="HighScoreButton" onclick="showHighScore(this)" style="margin-top: 5px;">Show High-score</button>
<select id="DifficultyMenu" onchange="difficultyChosen(this)">
<option value="">--Change difficulty--</option>
<option value="BEGINNER">Beginner</option>
<option value="INTERMEDIATE">Intermediate</option>
<option value="EXPERT">Expert</option>
<option value="CUSTOM">Custom</option>
</select>
<br>
<div style="margin-top: 15px; display: none;" class="BottomLayer" id="HighScoreLayer">
<span style="font-size: 16pt;">🏆</span>
<span id="HighScoreCounter" style="font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 16pt;">999</span>
</div>
</fieldset>
</div>
<div id="BackgroundDim">
<div id="PopupWindow">
<h2>Custom difficulty options</h2>
<div id="PoputContent">
<div class="InputBox">
<label class="PopupLabel">Amount of horizontal cells</label><br>
<input type="number" id="HorizontalCellsInput">
</div>
<div class="InputBox">
<label class="PopupLabel">Amount of vertical cells</label><br>
<input type="number" id="VerticalCellsInput">
</div>
<div class="InputBox">
<label class="PopupLabel">Amount of mines</label><br>
<input onblur="calcDensity()" type="number" id="MinesInput">
</div>
<p>Mine density is:<span id="MineDensity" style="font-weight: 600;"> </span>% <br>(Expert difficulty mine density is 20.5%)</p>
<button onclick="startCustomGame()" class="PopupButton">Start!</button><br>
<button onclick="cancelCustom()" style="margin-top: 8px; background-color: rgb(235, 235, 235); color: rgb(25, 25, 25); padding-left: 15px; padding-right: 15px;">Cancel</button>
</div>
</div>
</div>
<script src="script.js"></script>
<script src="bgcollist.js"></script>
</body>
</html>