diff --git a/server.js b/server.js index 7fa6977..2612ca1 100644 --- a/server.js +++ b/server.js @@ -579,7 +579,7 @@ wss.on('connection', (ws) => { // Simulate a wheel spin result and update room state let spinResult = getRandomValue(wheel) - if (spinResult != ['lose a turn', 'spin again', 'Bankrupt'].indexOf(spinResult)) { + if (typeof spinResult !== 'string') { room.gameState.turnState = 'guess' room.gameState.players = room.gameState.players.map((player) => { return player.id === ws.identifierToken ? {...player, points:parseInt(player.points)+parseInt(spinResult)} : player