-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
167 lines (156 loc) · 5.85 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous"
/>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"
integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
crossorigin="anonymous"
></script>
<link rel="shortcut icon" type="image/ico" href="img/favicon.ico" />
<link rel="stylesheet" type="text/css" href="css/connect4.css" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" />
<title>Connect 4</title>
</head>
<body>
<div class="container">
<div class="text-center" id="loading">
<h1 class="display-4">Loading...</h1>
</div>
<div class="row">
<div class="col">
<div class="canvasContainer" id="game"></div>
</div>
</div>
<div class="row">
<div class="col">
<img id="redturnIn" src="img/bestchipred.png" class="chipIndicator img-fluid float-left" />
<h5>
<span id="redVic" class="badge badge-danger chipIndicator">0</span>
</h5>
</div>
<div class="col mx-auto my-auto text-center">
<h6 id="game-status"></h6>
<div id="copyBox" class="input-group mb-3">
<input
id="hostLink"
type="text"
class="form-control"
value=""
onFocus="this.select();"
onfocusout="window.getSelection().removeAllRanges();"
aria-label="host link"
style="background-color:White"
aria-describedby="basic-addon2"
readonly
/>
<div class="input-group-append">
<button
id="copyButton"
class="btn btn-outline-primary"
type="button"
data-container="body"
data-toggle="popover"
data-placement="bottom"
data-trigger="focus"
data-delay='{"hide": 1000}'
data-content="Copied!"
>
Copy
</button>
</div>
</div>
<button type="button" class="btn btn-primary big-screen-button" id="resetButton" onclick="resetGame()">
Menu
</button>
<div class="col">
<button type="button" class="btn btn-danger big-screen-button" id="playAgainButton">
Play Again
</button>
</div>
</div>
<div class="col">
<img id="blueturnIn" src="img/bestchipblue.png" class="chipIndicator img-fluid float-right" />
<h5>
<span id="blueVic" class="badge badge-primary chipIndicator float-right">0</span>
</h5>
</div>
</div>
</div>
<div class="modal fade" id="gamemodeSelector" data-keyboard="false" data-backdrop="static">
<div style="text-align: center;">
<div class="modal-dialog" role="document" style="display: inline-block;">
<div class="modal-content">
<div class="row mx-auto">
<img id="logo" src="img/spinningchip.gif" height="128px" style="max-width: 100%;" />
</div>
<div class="row mx-auto">
<h4>Connect 4</h4>
</div>
<div class="modal-body mx-auto" style="text-align:center;">
<div id="gamemodeSelectorButtons" role="group">
<button type="button" class="btn btn-primary" id="single">
Single Player
</button>
<button type="button" class="btn btn-primary" id="local">
Local Multiplayer
</button>
<button type="button" class="btn btn-primary" id="host">
Online Multiplayer
</button>
</div>
</div>
<div class="modal-footer">
<div>
Made with ❤️ by
<a href="https://kevinshannon.dev/" target="_blank">
Kevin Shannon
</a>
and
<a href="https://www.tannerkrewson.com/" target="_blank">
Tanner Krewson
</a>
<br />
<a href="https://github.com/kevin-shannon/connect4" target="_blank">
View on GitHub
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- jQuery first, then Bootstrap JS -->
<script
src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/peerjs.min.js"
integrity="sha256-e1yWu3sXOHFexYeDonJSjQVXJzai7A+m2hmSizA253Y="
crossorigin="anonymous"
></script>
<!-- Player modules -->
<script src="js/bin/helperMethods.js"></script>
<script src="js/players/localPlayer.js"></script>
<script src="js/players/minimaxPlayer.js"></script>
<script src="js/players/remotePlayer.js"></script>
<script src="js/players/drunkPlayer.js"></script>
<script src="js/connect4.js"></script>
</body>
</html>