feat(bot): vsAi/aiOpponent protocol fields and bot-driver registry
This commit is contained in:
@@ -34,6 +34,7 @@ export type ServerMessage =
|
||||
mode: Mode;
|
||||
highlightingEnabled: boolean;
|
||||
opponentConnected: boolean;
|
||||
aiOpponent?: { color: Color; brain: 'casual' | 'recon' };
|
||||
}
|
||||
| {
|
||||
type: 'update';
|
||||
@@ -44,6 +45,7 @@ export type ServerMessage =
|
||||
drawOffer?: { from: Color } | null;
|
||||
endReason?: EndReason;
|
||||
winner?: Color | null;
|
||||
aiOpponent?: { color: Color; brain: 'casual' | 'recon' };
|
||||
}
|
||||
| { type: 'peer-status'; color: Color; connected: boolean; graceUntil?: number }
|
||||
| { type: 'error'; code: ErrorCode; message: string }
|
||||
@@ -53,10 +55,11 @@ export interface CreateGameRequest {
|
||||
mode: Mode;
|
||||
side: Color | 'random';
|
||||
highlightingEnabled: boolean;
|
||||
vsAi?: { brain: 'casual' | 'recon' };
|
||||
}
|
||||
|
||||
export interface CreateGameResponse {
|
||||
gameId: GameId;
|
||||
creatorToken: PlayerToken;
|
||||
joinUrl: string;
|
||||
joinUrl: string | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user