projects
/
pokerwave.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db1f725
)
toggle active based on which player is active
author
Geoffrey Allott
<geoffrey@allott.email>
Wed, 7 Jun 2023 21:52:57 +0000
(22:52 +0100)
committer
Geoffrey Allott
<geoffrey@allott.email>
Wed, 7 Jun 2023 21:52:57 +0000
(22:52 +0100)
site/modules/cribbage.js
patch
|
blob
|
history
diff --git
a/site/modules/cribbage.js
b/site/modules/cribbage.js
index 939a37313a7f4a2263a99a917e71c6861fc31b2a..ea84c5cbc570b139c32b735a763d6c9c316074bd 100644
(file)
--- 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);