Skip to content

Commit

Permalink
Allow for escaping games to be annulled
Browse files Browse the repository at this point in the history
  • Loading branch information
anoek committed Sep 19, 2023
1 parent 4f69dac commit de9207c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/GobanCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2780,10 +2780,11 @@ export abstract class GobanCore extends EventEmitter<Events> {
winner,
});
}
public sendPreventEscaping(winner: "black" | "white"): void {
public sendPreventEscaping(winner: "black" | "white", annul: boolean): void {
this.socket.send("game/prevent_escaping", {
game_id: this.game_id,
winner,
annul,
});
}

Expand Down
3 changes: 3 additions & 0 deletions src/protocol/ClientToServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ export interface ClientToServer extends ClientToServerBase {

/** The proposed winner */
winner: "black" | "white";

/** Request that the game be annulled or not */
annul: boolean;
}) => void;

/** Inform the server that the client believes it's clock has timed out
Expand Down

0 comments on commit de9207c

Please sign in to comment.