Skip to content

Commit

Permalink
progress unblocked
Browse files Browse the repository at this point in the history
  • Loading branch information
lmaddox committed Jan 12, 2024
1 parent bed95ba commit 9277f89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ <h4>Current players online: <span id="players-online"></span></h4>
name : playerTag,
password: passwordTag,
secret : passwordTag,
test : passwordTag,
foo : passwordTag,
color : playerColor,
}, (socket) => {
$('#login-form').hide();
Expand Down
7 changes: 4 additions & 3 deletions src/game.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
namespace Flappy {
export interface IConnectionDetails {
name: string;
color: number;
name : string;
color : number;
password: string;
}

export class Game extends Phaser.Game {
Expand All @@ -17,7 +18,7 @@ namespace Flappy {
}

public connect(connectionDetails: IConnectionDetails, callback: (socket: SocketIOClient.Socket) => {}): void {
Global.socket = io.connect(Global.Constants.serverUrl, { query: `name=${connectionDetails.name}&color=${connectionDetails.color}` });
Global.socket = io.connect(Global.Constants.serverUrl, { query: `name=${connectionDetails.name}&color=${connectionDetails.color}&password=${connectionDetails.password}` });
Global.socket.on('connect', () => {
this.state.start('play');
callback(Global.socket);
Expand Down

0 comments on commit 9277f89

Please sign in to comment.