Skip to content

Commit efeb0a8

Browse files
committed
Quincunx: Add cards in hand status display
1 parent cc293f9 commit efeb0a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/games/quincunx.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ export class QuincunxGame extends GameBase {
697697
state.stack = state.stack.map(mstate => {
698698
for (let p = 1; p <= this.numplayers; p++) {
699699
if (p === opts.player) { continue; }
700-
mstate.hands[p-1] = [];
700+
mstate.hands[p-1] = mstate.hands[p-1].map(() => "");
701701
}
702702
return mstate;
703703
});
@@ -783,7 +783,7 @@ export class QuincunxGame extends GameBase {
783783
const areas: AreaPieces[] = [];
784784
for (let p = 1; p <= this.numplayers; p++) {
785785
const hand = [...this.hands[p-1]];
786-
if (hand.length > 0) {
786+
if (!hand.includes("")) {
787787
const sorted = hand.map(uid => Card.deserialize(uid)!).sort(cardSortAsc).map(c => c.uid);
788788
areas.push({
789789
type: "pieces",
@@ -856,7 +856,7 @@ export class QuincunxGame extends GameBase {
856856
}
857857
return [
858858
{ name: i18next.t("apgames:status.SCORES"), scores},
859-
// { name: i18next.t("apgames:status.CARDSINHAND"), scores: this.hands.map(h => h.length)},
859+
{ name: i18next.t("apgames:status.CARDSINHAND"), scores: this.hands.map(h => h.length)},
860860
];
861861
}
862862

0 commit comments

Comments
 (0)