mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-03 05:54:27 -05:00
12 lines
387 B
TypeScript
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);
|
|
},
|
|
});
|
|
}
|