Skip to content

Commit 9c32e50

Browse files
committed
Add pause_control to GobanEngineConfig
1 parent 1c2222d commit 9c32e50

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/GobanBase.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import {
3737
JGOFNumericPlayerColor,
3838
JGOFMove,
3939
} from "./engine/formats/JGOF";
40-
import { AdHocPackedMove, AdHocPauseControl } from "./engine/formats/AdHocFormat";
40+
import { AdHocPackedMove } from "./engine/formats/AdHocFormat";
4141
import { MessageID } from "./engine/messages";
4242
import type { GobanSocket } from "./engine/GobanSocket";
4343
import type { ServerToClient, GameChatLine } from "./engine/protocol";
@@ -84,10 +84,6 @@ export interface GobanConfig extends GobanEngineConfig, PuzzleConfig {
8484
spectator_log?: GobanChatLog;
8585
malkovich_log?: GobanChatLog;
8686

87-
// pause control
88-
pause_control?: AdHocPauseControl;
89-
paused_since?: number;
90-
9187
// settings
9288
draw_top_labels?: boolean;
9389
draw_left_labels?: boolean;

src/engine/GobanEngine.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import {
3838
JGOFIntersection,
3939
JGOFSealingIntersection,
4040
} from "./formats/JGOF";
41-
import { AdHocPackedMove } from "./formats/AdHocFormat";
41+
import { AdHocPackedMove, AdHocPauseControl } from "./formats/AdHocFormat";
4242
import { _ } from "./translate";
4343
import { EventEmitter } from "eventemitter3";
4444
import { GameClock, StallingScoreEstimate } from "./protocol";
@@ -164,6 +164,11 @@ export interface GobanEngineConfig extends BoardConfig {
164164
// This is used in gtp2ogs
165165
clock?: GameClock;
166166

167+
pause_control?: AdHocPauseControl;
168+
169+
/** a bit confusing — this reflects the last time a pause was started, even if the game is not currently paused */
170+
paused_since?: number;
171+
167172
/** Optional bot parameters */
168173
bot_parameters?: {
169174
slug: string; // slug to identify the target bot persona

0 commit comments

Comments
 (0)