Skip to content

Commit ceac34c

Browse files
authored
Added statuses() to Stiletto (#338)
1 parent e245044 commit ceac34c

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

locales/en/apgames.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3525,6 +3525,9 @@
35253525
"ROUND": "Round",
35263526
"SCORES": "Scores",
35273527
"STACKSIZES": "Stack heights",
3528+
"stiletto" : {
3529+
"DAGGER": "Dagger belongs to "
3530+
},
35283531
"tumbleweed": "Score (pieces + influence)",
35293532
"ESTIMATEDSCORES": "Estimated scores",
35303533
"TOPLACE": "Piece to place",

src/games/stiletto.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { GameBase, IAPGameState, IClickResult, IIndividualState, IValidationResult } from "./_base";
1+
import { GameBase, IAPGameState, IClickResult, IIndividualState, IStatus, IValidationResult } from "./_base";
22
import { APGamesInformation } from "../schemas/gameinfo";
33
import { APMoveResult } from "../schemas/moveresults";
44
import { reviver, UserFacingError } from "../common";
@@ -596,6 +596,14 @@ export class StilettoGame extends InARowBase {
596596
};
597597
}
598598

599+
public statuses(): IStatus[] {
600+
const daggerPlayer = this.hasDagger() ? this.currplayer : this.currplayer % 2 + 1;
601+
const status = `Player ${daggerPlayer}.\n`
602+
603+
return [{ key: i18next.t("apgames:status.stiletto.DAGGER"),
604+
value: [status] } as IStatus];
605+
}
606+
599607
public status(): string {
600608
let status = super.status();
601609
if (this.variants !== undefined) {

0 commit comments

Comments
 (0)