Skip to content

Commit f466ebb

Browse files
committed
Pahtum: Add Pass button
1 parent a2edd73 commit f466ebb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/games/pahtum.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { GameBase, IAPGameState, IClickResult, IIndividualState, IScores, IValidationResult } from "./_base";
1+
import { GameBase, IAPGameState, IClickResult, ICustomButton, IIndividualState, IScores, IValidationResult } from "./_base";
22
import { APGamesInformation } from "../schemas/gameinfo";
33
import { APRenderRep } from "@abstractplay/renderer/src/schemas/schema";
44
import { APMoveResult } from "../schemas/moveresults";
@@ -125,6 +125,13 @@ export class PahTumGame extends GameBase {
125125
return this.stack.length === 2;
126126
}
127127

128+
public getButtons(): ICustomButton[] {
129+
if (!this.variants.includes("quick") && this.stack.length === 2) {
130+
return [{ label: "pass", move: "pass" }];
131+
}
132+
return [];
133+
}
134+
128135
private get graph(): SquareDirectedGraph {
129136
return new SquareDirectedGraph(7, 7);
130137
}

0 commit comments

Comments
 (0)