Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lmaddox committed Dec 29, 2023
1 parent a5a1aea commit 92a9d65
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ <h4>Current players online: <span id="players-online"></span></h4>
</div>
</div>

<div class="form-group row">
<label for="password-tag" class="col-xs-12 col-md-2 col-form-label">Name</label>
<div class="col-xs-12 col-md-10">
<input id="password-tag" class="form-control" type="text" placeholder="e.g. TheLegend27">
<small class="form-text text-muted-grey">The secret field for your access code.</small>
</div>
</div>

<div class="form-group row">
<label for="player-color" class="col-xs-12 col-md-2 col-form-label">Colour</label>
<div class="col-xs-12 col-md-10">
Expand Down Expand Up @@ -150,11 +158,13 @@ <h4>Current players online: <span id="players-online"></span></h4>
connectButton.html('Connecting... <i class="fa fa-spinner fa-pulse fa-1x fa-fw"></i>');

let playerTag = $('#player-tag').val();
let passwordTag = $('#password-tag').val();
let playerColor = $('#player-color').val();

/* TODO check whether user exists in database and whether remaining uses is positive */
flappyGame.connect({
name: playerTag,
password: passwordTag,
color: playerColor,
}, (socket) => {
$('#login-form').hide();
Expand Down

0 comments on commit 92a9d65

Please sign in to comment.