We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d90f014 commit fa0bca8Copy full SHA for fa0bca8
src/games/pigs2.ts
@@ -683,9 +683,13 @@ export class Pigs2Game extends GameBaseSimultaneous {
683
for (let p = 1; p <= this.numplayers; p++) {
684
const order = this.orders[p-1];
685
if (Array.isArray(order) && order.length > 0) {
686
+ const pieces = order.map(c => cmd2glyph.get(c));
687
+ if (pieces.length === 0 || pieces.includes(undefined)) {
688
+ continue;
689
+ }
690
areas.push({
691
type: "pieces",
- pieces: order.map(c => cmd2glyph.get(c)!) as [string, ...string[]],
692
+ pieces: pieces as [string, ...string[]],
693
label: i18next.t("apgames:validation.pigs2.LABEL_ORDERS", {playerNum: p}) || `Player ${p}'s orders`,
694
});
695
}
0 commit comments