-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
101 lines (78 loc) · 2.59 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
<!-- v1.2 -->
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tic Tac Toe Game</title>
<link rel="stylesheet" href="css/style.css">
<script src="https://kit.fontawesome.com/8b681eaa53.js" crossorigin="anonymous"></script>
<script>
var a = window.matchMedia('(max-width: 500px)');
var b = window.matchMedia('(min-width: 501px)');
if(a.matches){
$(".game-status").text("Press Space Key To Start The Game");
}
if(b.matches){
$(".game-status").text("Click Start Button");
}
</script>
</head>
<body>
<header>
<h1>TIC TAC TOE GAME</h1>
</header>
<main id="main-box">
<h2 class="game-status"></h2>
<div id="game-container">
<svg class="cut-line" height="100%" width="100%">
<line x1="0" y1="0" x2="100%" y2="100%" viewBox=" 0 0 100 100" style="stroke: blue; stroke-width: 5;"></line>
</svg>
<div class="row row1">
<div id="box11" class="box">
</div>
<div id="box12" class="box">
</div>
<div id="box13" class="box">
</div>
</div>
<div class="row row2">
<div id="box21" class="box">
</div>
<div id="box22" class="box">
</div>
<div id="box23" class="box">
</div>
</div>
<div class="row row3">
<div id="box31" class="box">
</div>
<div id="box32" class="box">
</div>
<div id="box33" class="box">
</div>
</div>
</div>
<div id="score-box">
<div class="row row1">
<h4 class="plyrScor" id="plyr1Scor">Score</h4>
<h4 class="plyrScor" id="plyr2Scor">Score</h4>
</div>
<div class="row row2">
<h3 class="plyrName" id="plyr1Name"><i class="fas fa-times "></i> Player 1</h3>
<h3 class="plyrName" id="plyr2Name"><i class="far fa-circle "></i> Player 2</h3>
</div>
</div>
<!-- The .blur() method correctly removes the focus -->
<!-- https://stackoverflow.com/questions/36167366/remove-focus-from-button-once-clicked -->
<div class="all-btn">
<button class="start-btn" onclick="this.blur();">Start</button>
<button class="next-round-btn" onclick="this.blur();">Next Round</button>
<button class="restart-btn" onclick="this.blur();"><i class="fas fa-redo-alt" id="restart-btn-icon"></i>
Restart</button>
</div>
</main>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="script/game.js"></script>
</body>
</html>