-
Notifications
You must be signed in to change notification settings - Fork 0
/
tictactoe.html
95 lines (91 loc) · 3.34 KB
/
tictactoe.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
<!DOCTYPE html>
<html>
<head>
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="tictactoe.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="tictactoe.css">
<title>Tic Tac Toe</title>
</head>
<body>
<div class="container">
<header>
<h1>Tic-Tac-Toe</h1>
<h3>FreeCodeCamp</h3>
<main>
<table>
<tr>
<td id="tl" value='tl'></td>
<td id="tm" value='tm' class="v-middle"></td>
<td id="tr"></td>
</tr>
<tr>
<td id="ml" value='ml' class="h-middle"></td>
<td id="mm" value='mm' class="h-middle v-middle"></td>
<td id="mr" value='mr' class="h-middle"></td>
</tr>
<tr>
<td id="bl" value='bl'></td>
<td id="bm" value='bm' class="v-middle"></td>
<td id="br" value='br'></td>
</tr>
</table>
<button id="reset" class="btn btn-default">Reset</button>
</main>
<footer>
<p>created and coded by <a href="https://codepen.io/veewren">V.Wren</p>
</footer>
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" id="XO">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Welcome, Human</h4>
</div>
<div class="modal-body">
<p>Choose X or O</p>
<button type="button" class="btn btn-default" data-dismiss="modal" id='x'>X</button>
<button type="button" class="btn btn-default" data-dismiss="modal" id='o'>O</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="playerOneWin">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<h3> Player One Wins!</h3>
<button type="button" class="btn btn-default play-again" data-dismiss="modal" class='play-again'>Play Again</button>
<button type="button" class="btn btn-default dismiss" data-dismiss="modal">I'm Done</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="playerTwoWin">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<h3> Player Two Wins!</h3>
<button type="button" class="btn play-again btn-default" data-dismiss="modal">Play Again</button>
<button type="button" class="btn btn-default dismiss" data-dismiss="modal">I'm Done</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="draw">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<h3>It's a Draw!</h3>
<button type="button" class="btn btn-default play-again" data-dismiss="modal">Play Again</button>
<button type="button" class="btn btn-default dismiss" data-dismiss="modal">I'm Done</button>
</div>
</div>
</div>
</div>
</body>
</html>