Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/games/linage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ export class LinageGame extends GameBase {
apid: "9228bccd-a1bd-452b-b94f-d05380e6638f",
},
],
categories: ["goal>area", "mechanic>place", "board>shape>rect", "board>connect>rect"],
categories: ["goal>area", "mechanic>place", "board>shape>rect", "board>connect>rect", "components>simple>1c"],
variants: [
{ uid: "size-11", group: "board" },
{ uid: "size-13", group: "board" },
{ uid: "#board", }, // 15x15
{ uid: "size-17", group: "board" },
{ uid: "size-19", group: "board" },
],
flags: ["custom-buttons", "custom-colours", "experimental"]
flags: ["custom-buttons", "custom-colours", "no-moves", "scores", "experimental"]
};

public coords2algebraic(x: number, y: number): string {
Expand Down Expand Up @@ -397,7 +397,7 @@ export class LinageGame extends GameBase {

protected checkEOG(): LinageGame {
this.gameover = !this.hasPlacements() // all regions are owned
||
||
(this.lastmove === "pass" && // two consecutive passes occurred
this.stack[this.stack.length - 1].lastmove === "pass");

Expand Down Expand Up @@ -519,16 +519,19 @@ export class LinageGame extends GameBase {
}

public getButtons(): ICustomButton[] {
if (this.moves().includes("pass"))
return [{ label: "pass", move: "pass" }];
if (this.moves().includes("play-second"))
if (this.isKomiTurn()) {
return []; // no buttons should appear when typing Komi at start
}
if (this.isPieTurn()) {
return [{ label: "playsecond", move: "play-second" }];
return []; // no buttons should appear when typing Komi at start
}
return [{ label: "pass", move: "pass" }];
}

public sidebarScores(): IScores[] {
return [ { name: i18next.t("apgames:status.SCORES"),
scores: [this.getPlayerScore(1), this.getPlayerScore(2)] } ];
scores: [`${this.getPlayerScore(1)} (Vertical)`,
`${this.getPlayerScore(2)} (Horizontal)`] } ];
}

public getPlayerScore(player: number): number {
Expand Down
Loading