Commit 08943051 authored by JoyJ's avatar JoyJ

fix card selection

parent 9ffff8da
Pipeline #17301 canceled with stages
......@@ -67,8 +67,7 @@ function white_NEW()
"单推孙笑川",
"暗杀刘波",
"裁判",
"最后回答者",
"获胜者",
"本轮胜者",
"用舌头走路",
"在抗日剧中参演日本天皇",
"乔碧萝殿下",
......@@ -178,7 +177,7 @@ function white_NEW()
"肯德基疯狂星期四",
"V我50",
"慢动作",
"突然大便爆炸病",
"大便爆炸",
"自杀的念头",
"阳光与彩虹",
"俯冲",
......@@ -221,8 +220,8 @@ function white_NEW()
"妻子的职责",
"妇女选举权",
"世界和平",
"你必须建造额外的水晶塔",
"我得重新集结部队",
"建造额外的水晶塔",
"重新集结部队",
"阳光大姐",
"穆斯林",
"抽烟喝酒烫头",
......
......@@ -214,6 +214,9 @@ function readyForNextRound(gameId, playerId) {
function selectCard(gameId, playerId, whiteCardId) {
try {
var player = getPlayer(gameId, playerId);
if (player == game.players[game.Judge]){
return null;
}
player.selectedWhiteCardId = whiteCardId;
player.isReady = false;
......@@ -234,6 +237,9 @@ function selectCard(gameId, playerId, whiteCardId) {
function selectWinner(gameId, cardId) {
try{
var player = getPlayerByCardId(gameId, cardId);
if (player != game.players[game.Judge]){
return null;
}
var game = getGame(gameId);
game.winningCardId = cardId;
game.isReadyForReview = true;
......
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