-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
262 lines (204 loc) · 11.4 KB
/
index.html
File metadata and controls
262 lines (204 loc) · 11.4 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
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Tim Shaffer | RPS Multiplayer </title>
<!-- Added link to the jQuery Library -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Reset CSS - copied from http://meyerweb.com/eric/tools/css/reset/ -->
<link rel="stylesheet" href="./assets/css/reset.css">
<!-- Link for Bootstrap Styling -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<!-- Personal Stylesheet -->
<link rel="stylesheet" href="./assets/css/style.css">
<!-- Firebase References -->
<script src="https://www.gstatic.com/firebasejs/7.8.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.8.0/firebase-database.js"></script>
</head>
<body>
<!-- use a nav-bar for display of the Game Title -->
<nav>
<div class="nav-bar">
<h1 id="nav-bar-name">Rock - Paper - Scissors Multiplayer Game</h1>
</div>
</nav>
<!-- Division for the New User -->
<div class="container">
<div class="row jumbotron jumbotron-fluid mh-100" id="startup">
<!-- Section for User Sign In -->
<section id="new-player" class="col-sm-12">
<form>
<div class="form-group">
<label for="Name">Enter a User Name</label>
<input type="text" class="form-control" id="name-input">
</div>
<button type="submit" class="btn btn-primary" id="sub-button">Submit</button>
</form>
</section>
</div>
</div>
<!-- End of the division for the New User -->
<!-- Division for the Player Activities -->
<div class="container card grid" id="playerSection" style="display:none">
<!-- Section for Player Specifics -->
<section class="row">
<!-- Division for Player 1 to Select Rock, Paper, or Scissors -->
<div class="col-sm-4 card" id="player1">
<h3 class="card-header" id="play1-name">Player One</h3>
<div class="card-body">
<ul class="list-group list-group-flush" id="play1-game-choice">
<li class="list-group-item">
<button type="button" class="btn btn-primary btn-sm btn-block play1 hand" id="rock" value="r">Rock</button>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-warning btn-sm btn-block play1 hand" id="paper" value="p">Paper</button>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-info btn-sm btn-block play1 hand" id="scissor" value="s">Scissor</button>
</li>
</ul>
</div>
</div>
<!-- End of the division for Player 1 to Select Rock, Paper, or Scissors -->
<!-- Division to show the choices for the game from each player -->
<div class="col-sm-4 card" id="game-space">
<h3 class="card-header" >Game Play</h3>
<div class="card-body">
<ul class="list-group list-group-flush">
<li class="list-group-item">
<button type="button" class="btn btn-sm btn-block" id="play1-hand" disabled>Player 1 Hand</button>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-sm btn-block" >versus</button>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-sm btn-block" id="play2-hand" disabled>Player 2 Hand</button>
</li>
</ul>
</div>
</div>
<!-- End of the division to show the choices for the game from each player -->
<!-- Division for Player 2 to Select Rock, Paper, or Scissors -->
<div class="col-sm-4 card" id="player2">
<h3 class="card-header" id="play2-name">Player Two</h3>
<div class="card-body">
<ul class="list-group list-group-flush" id="play2-game-choice">
<li class="list-group-item">
<button type="button" class="btn btn-primary btn-sm btn-block play2 hand" id="rock" value="r">Rock</button>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-warning btn-sm btn-block play2 hand" id="paper" value="p">Paper</button>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-info btn-sm btn-block play2 hand" id="scissor" value="s">Scissor</button>
</li>
</ul>
</div>
</div>
<!--End of the division for Player 2 to Select Rock, Paper, or Scissors -->
</section>
<!-- End of the section for Player Specifics -->
<!-- Section for the Scoresheets, Displaying of Game Results, and a Rematch Selector -->
<section class="row">
<!-- Division for Player 1 Scoresheet -->
<div class="col-sm-4 card" id="play1-score">
<div class="card-body">
<h5 class="card-title">Scores:</h5>
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex justify-content-between align-items-center">
<h6 class="card-subtitle text-muted">Wins:</h6>
<span class="badge badge-success badge-pill" id="play1-win">0</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
<h6 class="card-subtitle text-muted">Losses:</h6>
<span class="badge badge-danger badge-pill" id="play1-loss">0</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
<h6 class="card-subtitle text-muted">Ties:</h6>
<span class="badge badge-secondary badge-pill" id="play1-tie">0</span>
</li>
</ul>
</div>
</div>
<!-- End of the division for Player 1 Scoresheet -->
<!-- Division to show the results of the last matchup and a rematch button -->
<div class="col-sm-4 card" id="results-space">
<div class="card-body">
<h5 class="card-title">Result</h5>
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex justify-content-between align-items-center">
<h6 class="card-subtitle text-muted" id="story-line"></h6>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
<h6 class="card-subtitle text-muted" id="winner-line"></h6>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
<button type="button" class="btn btn-secondary btn-sm btn-block" id="rematch">Rematch</button>
</li>
</ul>
</div>
</div>
<!-- End of the division to show the results of the last matchup and a rematch button -->
<!-- Division for Player 2 Scoresheet -->
<div class="col-sm-4 card" id="play2-score">
<div class="card-body">
<h5 class="card-title">Scores:</h5>
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex justify-content-between align-items-center">
<h6 class="card-subtitle text-muted">Wins:</h6>
<span class="badge badge-success badge-pill" id="play2-win">0</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
<h6 class="card-subtitle text-muted">Losses:</h6>
<span class="badge badge-danger badge-pill" id="play2-loss">0</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
<h6 class="card-subtitle text-muted">Ties:</h6>
<span class="badge badge-secondary badge-pill" id="play2-tie">0</span>
</li>
</ul>
</div>
</div>
<!-- End of the division for Player 2 Scoresheet -->
</section>
<!-- End of the section for the Scoresheets, Displaying of Game Results, and a Rematch Selector -->
</div>
<!-- End of the division for the Player Activities -->
<!-- Section Container for the messages -->
<section class="container card grid" id="messages">
<div class="card mb-4">
<div class="card-header">
<form id="IM">
<label for="button-input">Send a Message</label>
<input type="text" id="button-input">
<input class="btn btn-secondary" id="add-msg" type="submit" value="send">
</form>
</div>
<div class="card-body">
<div class="table-responsive-sm">
<table class="table table-striped table-sm table-hover" id='msg-table'>
<thead>
<tr>
<th scope="col">Tag</th>
<th scope="col">Message</th>
<th scope="col">Date/Time</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</section>
<!-- End of the section Container for the messages -->
<!-- Insert External Scripting -->
<script type="text/javascript" src="./assets/javascript/rpsgame.js"></script>
<!-- Link to Moment.js should go here -->
<script src="https://cdn.jsdelivr.net/momentjs/2.12.0/moment.min.js"></script>
<!-- for javascript -->
<!-- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> -->
</body>
</html>