Template
22 lines
481 B
TypeScript
22 lines
481 B
TypeScript
import { GameResponseDTO } from './dto/gameresponse.dto';
|
|
import { PlayerResponseDTO } from './dto/playerresponse.dto';
|
|
|
|
export class GameCreateEvent extends GameResponseDTO {
|
|
type: 'create';
|
|
}
|
|
|
|
export class GameDeleteEvent {
|
|
type: 'delete';
|
|
constructor(public id?: number) {}
|
|
}
|
|
export class GameJoinEvent {
|
|
type: 'joingame';
|
|
gameId: number;
|
|
constructor(
|
|
public player: PlayerResponseDTO,
|
|
game?: Partial<GameResponseDTO>,
|
|
) {
|
|
this.gameId = game.id;
|
|
}
|
|
}
|