From: Geoffrey Allott Date: Wed, 7 Jun 2023 21:52:57 +0000 (+0100) Subject: toggle active based on which player is active X-Git-Url: https://git.pointlesshacks.com/?a=commitdiff_plain;h=dc7d73fde15b7225770a989ea911e8af253692a9;p=pokerwave.git toggle active based on which player is active --- diff --git a/site/modules/cribbage.js b/site/modules/cribbage.js index 939a373..ea84c5c 100644 --- a/site/modules/cribbage.js +++ b/site/modules/cribbage.js @@ -34,6 +34,7 @@ export class Cribbage extends GameWithChat { redraw_players() { const active_player = this.active; + this.pass_control.classList.toggle("active", active_player === this.username && this.community.length !== 0 && this.hands.has(this.username) && this.hands.get(this.username).length !== 0); for (const [username, [icon, score, active]] of this.user_icons) { if (!this.seats.has(username)) { this.svg.removeChild(icon);