-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
136 lines (132 loc) · 4.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Tick Tack Toe</title>
<link rel="stylesheet" href="./assets/css/bootstrap.min.css" />
<link rel="stylesheet" href="./assets/css/style.css" />
</head>
<body>
<div class="container mt-5 main-content">
<h4 class="text-center">TICK TACK TOE GAME</h4>
<div id="mainStartBtn" class="text-center">
<button
data-toggle="modal"
data-target="#setPlayerModal"
class="btn btn-primary mt-5 btn-lg"
>
START
</button>
</div>
<div id="scoreDashboard" class="dashboard mb-4">
<div class="row">
<div class="col text-right">
Player 1 <span class="text-danger"> (X)</span> -
<b id="player1Name" class="badge badge-primary"></b> <br />
Score - <b id="player1Score"></b>
</div>
<div class="col text-center">
Current Turn -
<b id="current-turn" class="badge badge-success"></b>
</div>
<div class="col text-left">
Player 2 (0) -
<b id="player2Name" class="badge badge-primary"></b> <br />
Score - <b id="player2Score"></b>
</div>
</div>
</div>
<div class="ticktaktoe mt-5 mb-5"></div>
</div>
<!-- ==================== SET PLAYER MODAL ============================== -->
<div
class="modal fade"
id="setPlayerModal"
tabindex="-1"
role="dialog"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title text-center" id="exampleModalLabel">
<b>START</b>
</h5>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form method="post" action="">
<div class="form-group">
<label for="player1">Player 1</label>
<input
type="text"
id="player1"
name="player1"
value="Shubham"
placeholder="Enter Name"
class="form-control"
/>
</div>
<div class="form-group">
<label for="player2">Player 2</label>
<input
type="text"
id="player2"
name="player2"
value="Anshul"
placeholder="Enter Name"
class="form-control"
/>
</div>
<button
onclick="init(event)"
class="btn btn-success mt-3 btn-block text-center"
>
Start
</button>
</form>
</div>
<div class="modal-footer"></div>
</div>
</div>
</div>
<!-- ============================= TOAST NOTIFICATION =================== -->
<div id="toastNotificationContainer" aria-live="polite" aria-atomic="true">
<div
class="toast"
data-animation="true"
data-delay="2000"
style="position: absolute; top: 0; right: 0;"
>
<div class="toast-header bg-info">
<!-- <img src="..." class="rounded mr-2" alt="..." /> -->
<strong class="mr-auto text-white">TICK TACK TOE</strong>
<small></small>
<button
type="button"
class="ml-2 mb-1 close"
data-dismiss="toast"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
</div>
<div id="toastMessage" class="toast-body"></div>
</div>
</div>
<!-- ======================== SCRIPTS =================== -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="./assets/js/bootstrap.min.js"></script>
<script src="./assets/js/main.js"></script>
</body>
</html>