Compare commits
1
Commits
72935ba3f5
...
49adbdec5b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49adbdec5b |
+26
-15
@@ -1,23 +1,34 @@
|
||||
import { GameResponseDTO } from './dto/gameresponse.dto';
|
||||
import { PlayerResponseDTO } from './dto/playerresponse.dto';
|
||||
import { GameResponseDTO } from "./dto/gameresponse.dto";
|
||||
import { PlayerResponseDTO } from "./dto/playerresponse.dto";
|
||||
|
||||
export class GameCreateEvent extends GameResponseDTO {
|
||||
type = 'create';
|
||||
export class LobbyCreateEvent {
|
||||
type = "create";
|
||||
constructor(public game: GameResponseDTO) {}
|
||||
}
|
||||
|
||||
export class GameDeleteEvent {
|
||||
type = 'delete';
|
||||
constructor(public id?: number) { }
|
||||
export class LobbyStartEvent {
|
||||
type = "start";
|
||||
constructor(public game: GameResponseDTO) {}
|
||||
}
|
||||
export class GameJoinEvent {
|
||||
type = 'joingame';
|
||||
|
||||
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,
|
||||
game?: Partial<GameResponseDTO>,
|
||||
) {
|
||||
if (game && game.id) {
|
||||
this.gameId = game.id;
|
||||
}
|
||||
}
|
||||
public game: GameResponseDTO
|
||||
) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user