Commit 9d02842e authored by JoyJ's avatar JoyJ

not sure where is wrong. fix?

parent bc596453
Pipeline #17304 canceled with stages
......@@ -215,7 +215,7 @@ function selectCard(gameId, playerId, whiteCardId) {
try {
var player = getPlayer(gameId, playerId);
var game = getGame(gameId);
if (player == game.players[game.Judge]){
if (playerId == game.players[game.Judge].playerId){
return null;
}
player.selectedWhiteCardId = whiteCardId;
......@@ -237,9 +237,6 @@ function selectWinner(gameId, cardId) {
try{
var player = getPlayerByCardId(gameId, cardId);
var game = getGame(gameId);
if (player != game.players[game.Judge]){
return null;
}
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