Skip to content

Commit

Permalink
Merge pull request #230 from csci312a-s19/lobbie
Browse files Browse the repository at this point in the history
Lobbie
  • Loading branch information
jravishankar authored May 13, 2019
2 parents 6604543 + 84c52dd commit d6225fa
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 239 deletions.
82 changes: 22 additions & 60 deletions client/package-lock.json

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

5 changes: 4 additions & 1 deletion client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ const GUEST_ACCOUNT = {
total_multi_wins: 0,
map_0: -1,
map_1: -1,
map_2: -1
map_2: -1,
map_3: -1
};

const CenteredDiv = styled.div`
Expand Down Expand Up @@ -330,6 +331,7 @@ class App extends Component {
resetLobby={() => {
this.setState({ lobby: '' });
}}
lobby={this.state.lobby}
mapProps={this.state.mapProps}
goToMenu={this.handleGoToMenu}
guest={this.state.guest}
Expand All @@ -352,6 +354,7 @@ class App extends Component {
} else {
return (
<GameEngine
lobby={this.state.lobby}
mapProps={this.state.mapProps}
goToMenu={this.handleGoToMenu}
guest={this.state.guest}
Expand Down
4 changes: 3 additions & 1 deletion client/src/Engine/GameEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class GameEngine extends Component {
* each game will have a socket to connect back to the server
* store the other players as a member for THIS player
*/
this.socket = io.connect(this.props.lobby);
if (this.props.lobby) {
this.socket = io.connect('/' + this.props.lobby.toLowerCase());
}
}

// timeout for debounce
Expand Down
Loading

0 comments on commit d6225fa

Please sign in to comment.