Cockatrice/webclient/src/websocket/commands/room/createGame.ts
Jeremy Letto 8cc65b8967
Some checks failed
Build Docker Image / amd64 & arm64 (push) Waiting to run
Build Web / React (Node ${{matrix.node_version}}) (16) (push) Has been cancelled
Build Web / React (Node ${{matrix.node_version}}) (lts/*) (push) Has been cancelled
Initial implementation completion and refactor (#6806)
2026-04-11 23:51:10 -04:00

12 lines
387 B
TypeScript

import { BackendService } from '../../services/BackendService';
import { RoomPersistence } from '../../persistence';
import { GameConfig } from 'types';
export function createGame(roomId: number, gameConfig: GameConfig): void {
BackendService.sendRoomCommand(roomId, 'Command_CreateGame', gameConfig, {
onSuccess: () => {
RoomPersistence.gameCreated(roomId);
},
});
}