";
if (!value.game_started && value.restart_countdown > 0) {
html += "
" + t.restarting.replace("{sec}", value.restart_countdown) + "
";
}
let opponentsHtml = "
";
players.forEach((pName, i) => {
if (i === pIdx) return;
const isActive = (activePlayer === i);
const pOneCard = (hands[i].length === 1);
const pShouted = shoutedDeploy[i];
let riskHtml = "";
if (pOneCard && !pShouted && !waitingShout) {
riskHtml = "
" + t.risk + "
";
}
const showAccuse = (pOneCard && !pShouted && !isSpectator && !waitingShout && !value.pending_wild_shout);
let accuseHtml = showAccuse ? "
" + t.accuse + " " : "";
const isBot = (pName.toLowerCase() === "nemotron");
const avatarUrl = playerPictures[pName] || (isBot ? "/gradio_api/file=assets/nemotron.jpg" : "");
const avatarImg = avatarUrl
? "
"
: "
";
opponentsHtml += "
" +
"
" + pName + "
" +
"
" + avatarImg + " x" + hands[i].length + "
" +
riskHtml + accuseHtml + "
";
});
opponentsHtml += "
";
html += opponentsHtml;
const activeBadgeHtml = (activeCard && activeCard.badge) ? "
" + activeCard.badge + "
" : "";
const activeStack = activeCard ? activeCard.stack : "wild";
const activeSymbol = activeCard ? activeCard.categorySymbol : "🚀";
const activeName = activeCard ? activeCard.name : (t.final_deploy || "Final Deploy");
const activeRes = activeCard ? activeCard.res : 0;
const activePanic = activeCard ? activeCard.panic : 0;
html += "
" +
"
" + t.status + " " + crisis.title + "
" +
"
" + crisis.desc + "
" +
"
" +
"
" + t.res + " " + res + "%
" +
"
" +
"
" +
"
" +
"
" + t.panic + " " + panic + "%
" +
"
" +
"
" +
"
";
html += "
" +
"
" +
"
" + t.pick + "
" +
"
" +
" " + stackLabels.green + " " +
" " + stackLabels.blue + " " +
" " + stackLabels.red + " " +
" " + stackLabels.yellow + " " +
"
" +
"
" +
"
" +
"
" + t.draw + "
" +
"
" +
"
" +
"
" +
"
" + t.draw_btn + " " +
"
" +
"
" +
"
" +
"
" +
" " + t.pass + " " +
" " + t.shout + " (" + countdown + "s) " +
"
" +
"
" +
"
" + t.table + "
";
html += "
" + activeBadgeHtml +
"
" + activeSymbol + "
" +
"
" + activeName + "
" +
"
" +
" Res: " + (activeRes >= 0 ? '+' : '') + activeRes + "% " +
" Pan: " + (activePanic >= 0 ? '+' : '') + activePanic + "% " +
"
" +
"
" +
"
" +
"
";
if (!isSpectator) {
const isActive = (activePlayer === pIdx);
const pOneCard = (activeHand.length === 1);
const pShouted = shoutedDeploy[pIdx];
let badgeText = "";
if (pOneCard) {
if (pShouted) badgeText = t.deploy_saved;
else if (!waitingShout) badgeText = t.risk;
}
const myAvatarUrl = "/gradio_api/file=assets/icon_gradio.png";
const myAvatarImg = "
";
html += "
" +
"
" +
"
" +
" " + myId + " " + t.you + " (" + myAvatarImg + "x" + activeHand.length + ") " + badgeText + " " +
" 🚪 " + t.leave + " " +
" " +
"
";
activeHand.forEach((card, cIdx) => {
const resColor = card.res >= 0 ? 'stat-good' : 'stat-bad';
const panicColor = card.panic <= 0 ? 'stat-good' : 'stat-bad';
const textClass = card.stack === 'yellow' ? 'text-dark' : 'text-light';
const cardBadgeHtml = card.badge ? "
" + card.badge + "
" : "";
html += "
" + cardBadgeHtml +
"
" + card.categorySymbol + "
" +
"
" + card.name + "
" +
"
" +
" Res: " + (card.res >= 0 ? '+' : '') + card.res + "% " +
" Pan: " + (card.panic >= 0 ? '+' : '') + card.panic + "% " +
"
" +
"
";
});
html += "
";
} else if (inQueue) {
const qMsg = t.queue_msg.replace("{pos}", queuePos);
html += "
" + qMsg + "
";
}
html += "