Commit bc596453 authored by JoyJ's avatar JoyJ

fix typo

parent 8a299ff9
Pipeline #17303 canceled with stages
......@@ -214,14 +214,13 @@ function readyForNextRound(gameId, playerId) {
function selectCard(gameId, playerId, whiteCardId) {
try {
var player = getPlayer(gameId, playerId);
var game = getGame(gameId);
if (player == game.players[game.Judge]){
return null;
}
player.selectedWhiteCardId = whiteCardId;
player.isReady = false;
var game = getGame(gameId);
var readyPlayers = _.filter(game.players, function (x) {
return x.selectedWhiteCardId;
});
......@@ -237,10 +236,10 @@ function selectCard(gameId, playerId, whiteCardId) {
function selectWinner(gameId, cardId) {
try{
var player = getPlayerByCardId(gameId, cardId);
var game = getGame(gameId);
if (player != game.players[game.Judge]){
return null;
}
var game = getGame(gameId);
game.winningCardId = cardId;
game.isReadyForReview = true;
player.awesomePoints = player.awesomePoints + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment