Template
35 lines
727 B
TypeScript
35 lines
727 B
TypeScript
import { GameResponseDTO } from './dto/gameresponse.dto';
|
|
import { PlayerResponseDTO } from './dto/playerresponse.dto';
|
|
|
|
export class LobbyCreateEvent {
|
|
type = 'create';
|
|
constructor(public game: GameResponseDTO) {}
|
|
}
|
|
|
|
export class LobbyStartEvent {
|
|
type = 'start';
|
|
constructor(public game: GameResponseDTO) {}
|
|
}
|
|
|
|
export class LobbyDeleteEvent {
|
|
type = 'delete';
|
|
constructor(public id: number) {}
|
|
}
|
|
|
|
export class LobbyJoinEvent {
|
|
type = 'joingame';
|
|
constructor(
|
|
public player: PlayerResponseDTO,
|
|
public game: GameResponseDTO,
|
|
) {}
|
|
}
|
|
|
|
export class LobbyLeaveEvent {
|
|
type = 'leavegame';
|
|
gameId?: number;
|
|
constructor(
|
|
public player: PlayerResponseDTO,
|
|
public game: GameResponseDTO,
|
|
) {}
|
|
}
|