forked from ChromeGaming/Dot-Box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
204 lines (178 loc) · 6.06 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Stylesheet -->
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="theme.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- JavaScript files -->
<script defer src="./js/edge.js"></script>
<script defer src="./js/box.js"></script>
<script defer src="./js/board.js"></script>
<script defer src="./js/game.js"></script>
<script defer src="./js/theme.js"></script>
<!-- Logo of the game -->
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
<!-- Title of the game -->
<title>Dots & Boxes Game</title>
<style>
.preloader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: black;
display: flex;
justify-content: center;
align-items: center;
z-index: 9999; /* Ensure the preloader is above all other content */
}
.circle {
width: 200px;
height: 200px;
background-color: black;
border-radius: 50%;
animation: circleAnimation 2s infinite linear, glowingBorder 2s infinite linear;
box-shadow: 0 0 20px 10px black; /* Adjusted shadow values */
}
.circle:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: rgb(87, 123, 141);
animation: circleAnimation 2s infinite linear, glowingBorder 2s infinite linear;
}
.circle:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: rgb(59, 141, 182);
animation: circleAnimation 2s infinite linear, glowingBorder 2s infinite linear;
}
@keyframes circleAnimation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes glowingBorder {
0% {
box-shadow: 0 0 20px 10px rgb(36, 138, 188); /* Adjusted shadow values */
}
50% {
box-shadow: 0 0 40px 20px rgb(62, 135, 171); /* Adjusted shadow values */
}
100% {
box-shadow: 0 0 20px 10px rgb(87, 123, 141); /* Adjusted shadow values */
}
}
</style>
</head>
<body>
<div class="preloader">
<div class="circle"></div>
</div>
<script>
window.addEventListener("load", () => {
const preloader = document.querySelector(".preloader");
preloader.style.opacity = "0";
preloader.style.visibility = "hidden";
// Wait for the transition to complete before removing the preloader
setTimeout(() => {
preloader.remove();
}, 1000); // Adjust the timeout duration as needed
});
</script>
<!-- Setting Page -->
<div class="settings">
<video autoplay loop muted plays-inline class="back">
<source src="./back.mp4" type="video/mp4">
</video>
<div class="form">
<div class="overlay-container">
<h1 class="heading"
style="font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color:rgb(52, 76, 100);">
▁ ▂ ▄ ▅ ▆ ▇ █ <span style="color: rgb(87, 166, 161);">MAXIMISE</span> BOXES!! █ ▇ ▆ ▅ ▄ ▂ ▁
</h1>
<h3 class="instructions-heading" style="color: white; background-color: rgb(87, 123, 141);">Instructions</h3>
<p class="instructions" style="color: rgb(211, 211, 211);">
<br>
1. Select the number of rows, columns and players. <br>
2. The player who has maximum number of boxes on board is the winner. <br>
3. Players will switch after every turn. But the player who has filled the last box, will get one extra
chance
consecutively. <br>
</p>
</div>
</div>
<div class="overlay-container">
<!-- Form page -->
<div class="form">
<div>
<h2 style="color: rgb(211, 211, 211);">What size of Board do you want? :</h2>
</div>
<div class="form-item">
<label for="rows" style="color: rgb(211, 211, 211);">Rows : <span class="details">(between 5 and 30)</span></label>
<input type="number" id="rows" min="5" max="30" value="6" />
<span id="rows-warning" class="warning">
Please enter a number between 5 and 30.
</span>
</div>
<div class="form-item">
<label for="columns" style="color: rgb(211, 211, 211);">Columns : <span class="details">(between 5 and 30)</span></label>
<input type="number" id="columns" min="5" max="30" value="6" />
<span id="columns-warning" class="warning">
Please enter a number between 5 and 30.
</span>
</div>
<div class="form-item">
<label for="players-count" style="color: rgb(211, 211, 211);">Players : <span class="details">(between 2 and 6)</span></label>
<input type="number" id="players-count" min="2" max="6" value="2" />
<span id="players-warning" class="warning">
Please enter a number between 2 and 6.
</span>
</div>
<button class="start-btn" style="background-color:rgb(87, 123, 141);">START</button>
</div>
</div>
</div>
<!-- Players -->
<div class="players" style="margin-top: 50px;"></div>
<div class="player-turn">
<div class="bg" style="margin-top: 60px;">
<span class="name">PlayerX</span>'s turn
</div>
</div>
<!-- Game Page -->
<div class="board" style="margin-top: 154px;"></div>
<div>
<button id="theme-button" class="theme-btn">Change Theme</button>
<div id="theme-options" class="hidden">
<button class="theme-option" data-video="back.mp4">Starry Night</button>
<button class="theme-option" data-video="back2.mp4">Aurora</button>
<button class="theme-option" data-video="back3.mp4">Waterfall</button>
<button class="theme-option" data-video="back4.mp4">Garden</button>
<button class="theme-option" data-video="back5.mp4">Beach</button>
</div>
<!-- Background Videos -->
<video autoplay loop muted plays-inline class="back" id="background-video">
<source src="./background/back4.mp4" type="video/mp4">
</video>
<button class="mute-btn"><i class="fa fa-volume-up fa-2x"></i></button>
</body>
</html>