-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
102 lines (100 loc) · 5.98 KB
/
index.html
File metadata and controls
102 lines (100 loc) · 5.98 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<title>Tic Tac Toe</title>
</head>
<body class="bg-dark vh-100 d-flex justify-content-center align-items-center">
<!-- Button trigger modal -->
<div class="container">
<div class="row-4 d-flex justify-content-center">
<div id="game">
<div class="my-2 h2 text-center" id="display" style="height: 30px">
</div>
<table>
<tr>
<th><button onClick="play(this.id)" id="0" class="game-btn btn-primary"></button></th>
<th><button onClick="play(this.id)" id="1" class="game-btn btn-primary"></button></th>
<th><button onClick="play(this.id)" id="2" class="game-btn btn-primary"></button></th>
</tr>
<tr>
<th><button onClick="play(this.id)" id="3" class="game-btn btn-primary"></button></th>
<th><button onClick="play(this.id)" id="4" class="game-btn btn-primary"></button></th>
<th><button onClick="play(this.id)" id="5" class="game-btn btn-primary"></button></th>
</tr>
<tr>
<th><button onClick="play(this.id)" id="6" class="game-btn btn-primary"></button></th>
<th><button onClick="play(this.id)" id="7" class="game-btn btn-primary"></button></th>
<th><button onClick="play(this.id)" id="8" class="game-btn btn-primary"></button></th>
</tr>
</table>
</div>
</div>
<div class="row-4 my-4 d-flex justify-content-center">
<button class="btn-warning rounded me-3" onClick="reset()">Restart</button>
<button type="button" class="btn btn-dark ms-3" data-bs-toggle="modal" data-bs-target="#exampleModal">
Help
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog model-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Example Scenarios</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="container">
<h5>Win:</h5>
<div class="row-3 my-3 d-flex flex-direction-row justify-content-around">
<div class="col-3">
<img src="images/win-1.png" alt="win-1" width="120%" height="auto">
</div>
<div class="col-3">
<img src="images/win-2.png" alt="win-2" width="120%" height="auto">
</div>
<div class="col-3">
<img src="images/win-3.png" alt="win-3" width="120%" height="auto">
</div>
</div>
<h5>Loss:</h5>
<div class="row-3 my-3 d-flex flex-direction-row justify-content-around">
<div class="col-3">
<img src="images/lose-1.png" alt="lose-1" width="120%" height="auto">
</div>
<div class="col-3">
<img src="images/lose-2.png" alt="lose-2" width="120%" height="auto">
</div>
<div class="col-3">
<img src="images/lose-3.png" alt="lose-3" width="120%" height="auto">
</div>
</div>
<h5>Tie:</h5>
<div class="row-3 my-3 d-flex flex-direction-row justify-content-around">
<div class="col-3">
<img src="images/draw-1.png" alt="draw-1" width="120%" height="auto">
</div>
<div class="col-3">
<img src="images/draw-2.png" alt="draw-2" width="120%" height="auto">
</div>
<div class="col-3">
<img src="images/draw-3.png" alt="draw-3" width="120%" height="auto">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="script.js"></script>
</body>
</html>