diff --git a/src/GobanBase.ts b/src/GobanBase.ts index 72e0c518..f2ea0479 100644 --- a/src/GobanBase.ts +++ b/src/GobanBase.ts @@ -363,4 +363,9 @@ export abstract class GobanBase extends EventEmitter { public decodePrettyCoordinates(coordinates: string): JGOFMove { return this.engine.decodePrettyCoordinates(coordinates); } + + /** True if the game is a game record of a real life game */ + public get is_game_record(): boolean { + return this.engine.is_game_record; + } } diff --git a/src/engine/GobanEngine.ts b/src/engine/GobanEngine.ts index 8df70f82..6a932094 100644 --- a/src/engine/GobanEngine.ts +++ b/src/engine/GobanEngine.ts @@ -127,6 +127,7 @@ export interface GobanEngineConfig extends BoardConfig { reviews?: { [review_id: number]: GobanEnginePlayerEntry; }; + is_game_record?: boolean /* Indicates that this game is a game record of a real life game */; time_control?: JGOFTimeControl; moves?: GobanMovesArray; @@ -342,6 +343,7 @@ export class GobanEngine extends BoardState { }; public rengo_casual_mode: boolean; public stalling_score_estimate?: StallingScoreEstimate; + public readonly is_game_record: boolean = false; /* Properties that emit change events */ private _phase: GobanEnginePhase = "play"; @@ -507,6 +509,7 @@ export class GobanEngine extends BoardState { const self = this; this.config = config; + this.is_game_record = !!config.is_game_record; this.dontStoreBoardHistory = !!dontStoreBoardHistory; /* Server side, we don't want to store board snapshots */