fixed linting
This commit is contained in:
@@ -163,7 +163,6 @@ let stages: string[] = [];
|
||||
let currentIndex: number = 0;
|
||||
const defaultStages: string[] = ['cementery', 'prison', 'torture', 'inquisition', 'quadrangle', 'clock', 'spiral', 'empireo', 'cathedral', 'close', 'arrange'];
|
||||
|
||||
|
||||
io.on('connection', (socket: socketIo.Socket) => {
|
||||
socket.on('disconnect', () => {
|
||||
console.log('disconnect');
|
||||
@@ -174,7 +173,7 @@ io.on('connection', (socket: socketIo.Socket) => {
|
||||
io.emit('exitGame');
|
||||
room = false;
|
||||
initRoom();
|
||||
Object.keys(io.sockets.sockets).forEach((s) => {
|
||||
Object.keys(io.sockets.sockets).forEach((s: string) => {
|
||||
io.sockets.sockets[s].disconnect(true);
|
||||
});
|
||||
});
|
||||
@@ -193,7 +192,7 @@ io.on('connection', (socket: socketIo.Socket) => {
|
||||
playerOneOption,
|
||||
playerTwo,
|
||||
playerTwoOption
|
||||
}
|
||||
};
|
||||
io.emit('jankenResult', message);
|
||||
}
|
||||
});
|
||||
@@ -207,10 +206,9 @@ io.on('connection', (socket: socketIo.Socket) => {
|
||||
socket.emit('registerUser', data);
|
||||
}
|
||||
const message = {
|
||||
playerOne: playerOne,
|
||||
playerTwo: playerTwo,
|
||||
playerOne,
|
||||
playerTwo
|
||||
};
|
||||
console.log()
|
||||
io.emit('login', message);
|
||||
});
|
||||
socket.on('moveToStage', () => {
|
||||
@@ -248,19 +246,18 @@ io.on('connection', (socket: socketIo.Socket) => {
|
||||
playerTwo: '',
|
||||
};
|
||||
socket.emit('login', message);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (playerOne === '' || playerTwo === '' || playerOneOption === '' || playerTwoOption === '') {
|
||||
const message = {
|
||||
playerOne: playerOne,
|
||||
playerTwo: playerTwo,
|
||||
playerOne,
|
||||
playerTwo,
|
||||
};
|
||||
socket.emit('login', message);
|
||||
} else {
|
||||
const message = {
|
||||
stages,
|
||||
currentIndex
|
||||
}
|
||||
};
|
||||
socket.emit('stages', message);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user