mirror of
https://github.com/owenlejeune/AirHockey.git
synced 2025-12-27 01:41:23 -05:00
Comment cleanup
This commit is contained in:
18
app.js
18
app.js
@@ -112,24 +112,6 @@ io.on("connection", (socket) => {
|
||||
socket.on("newPlayerRequest", (data) => {
|
||||
var receivedData = JSON.parse(data);
|
||||
findPlayerPosition(receivedData.name, receivedData.id);
|
||||
// if(PLAYERS_AVAILABLE.p1){
|
||||
// PLAYERS_AVAILABLE.p1 = false;
|
||||
// player1.colour = PLAYER_1_COLOUR;
|
||||
// player1.name = name;
|
||||
// var responseObj = {id: receivedData.id, player: player1};
|
||||
// io.emit("newPlayerResponse", JSON.stringify(responseObj));
|
||||
// }else if(PLAYERS_AVAILABLE.p2){
|
||||
// PLAYERS_AVAILABLE.p2 = false;
|
||||
// player2.colour = PLAYER_2_COLOUR;
|
||||
// player2.name = name;
|
||||
// var responseObj = {id: receivedData.id, player:player2};
|
||||
// io.emit("newPlayerResponse", JSON.stringify(responseObj));
|
||||
// }else{
|
||||
// spectators.push({id: receivedData.id, name: name});
|
||||
// console.log(`Spectators ${spectators}`);
|
||||
// io.emit("newPlayerResponse", JSON.stringify({id: receivedData.id, player: SPECTATOR_STATE, names: spectators}));
|
||||
// }
|
||||
// startGame();
|
||||
});
|
||||
socket.on("playerLeaveGame", (data) => {
|
||||
var receivedData = JSON.parse(data);
|
||||
|
||||
Reference in New Issue
Block a user