projects
/
pokerwave.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec1f766
)
fix display of active player when a player plays his last card while other players...
author
Geoffrey Allott
<geoffrey@allott.email>
Sun, 2 Jul 2023 21:46:18 +0000
(22:46 +0100)
committer
Geoffrey Allott
<geoffrey@allott.email>
Sun, 2 Jul 2023 21:46:18 +0000
(22:46 +0100)
site/modules/cribbage.js
patch
|
blob
|
history
diff --git
a/site/modules/cribbage.js
b/site/modules/cribbage.js
index c3ce18f902e870ceec5c9ae6ff8d7eb1435691a6..10710f665dd780c659648ef0ef8c33c41e0d283a 100644
(file)
--- a/
site/modules/cribbage.js
+++ b/
site/modules/cribbage.js
@@
-268,7
+268,7
@@
export class Cribbage extends GameWithChat {
image:this.card_image(user_action.username, user_action.action.card),
});
}
- if (this.count === 31) {
+ if (this.count === 31
|| this.passed.size === [...this.hands.values()].filter(hand => hand.length > 0).length
) {
this.clear_pegging();
}
this.active = this.player_after(user_action.username, username => !this.passed.has(username) && this.hands.has(username) && this.hands.get(username).length > 0);