chore: formatting
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
export class UserResponseDTO {
|
export class UserResponseDTO {
|
||||||
constructor(partial: Partial<UserResponseDTO>) {
|
constructor(partial: UserResponseDTO) {
|
||||||
this.id = partial.id;
|
this.id = partial.id;
|
||||||
this.username = partial.username;
|
this.username = partial.username;
|
||||||
this.avatar = partial.avatar;
|
this.avatar = partial.avatar;
|
||||||
|
|||||||
+10
-10
@@ -1,46 +1,46 @@
|
|||||||
import { MessageResponseDTO } from './dto/messageresponse.dto';
|
import { MessageResponseDTO } from "./dto/messageresponse.dto";
|
||||||
import { PlayerResponseDTO } from './dto/playerresponse.dto';
|
import { PlayerResponseDTO } from "./dto/playerresponse.dto";
|
||||||
import type { ConceptEvent } from './events';
|
import type { ConceptEvent } from "./events";
|
||||||
|
|
||||||
export class GameStartEvent implements ConceptEvent {
|
export class GameStartEvent implements ConceptEvent {
|
||||||
type = 'start';
|
type = "start";
|
||||||
constructor(public currentPlayer: PlayerResponseDTO) {
|
constructor(public currentPlayer: PlayerResponseDTO) {
|
||||||
this.currentPlayer = new PlayerResponseDTO(currentPlayer);
|
this.currentPlayer = new PlayerResponseDTO(currentPlayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GameDeleteEvent implements ConceptEvent {
|
export class GameDeleteEvent implements ConceptEvent {
|
||||||
type = 'delete';
|
type = "delete";
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GameJoinEvent implements ConceptEvent {
|
export class GameJoinEvent implements ConceptEvent {
|
||||||
type = 'joingame';
|
type = "joingame";
|
||||||
constructor(public player: PlayerResponseDTO) {
|
constructor(public player: PlayerResponseDTO) {
|
||||||
this.player = new PlayerResponseDTO(player);
|
this.player = new PlayerResponseDTO(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GameLeaveEvent implements ConceptEvent {
|
export class GameLeaveEvent implements ConceptEvent {
|
||||||
type = 'leavegame';
|
type = "leavegame";
|
||||||
constructor(public player: PlayerResponseDTO) {
|
constructor(public player: PlayerResponseDTO) {
|
||||||
this.player = new PlayerResponseDTO(player);
|
this.player = new PlayerResponseDTO(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GameMessageEvent implements ConceptEvent {
|
export class GameMessageEvent implements ConceptEvent {
|
||||||
type = 'message';
|
type = "message";
|
||||||
constructor(public message: MessageResponseDTO) {
|
constructor(public message: MessageResponseDTO) {
|
||||||
this.message = new MessageResponseDTO(message);
|
this.message = new MessageResponseDTO(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GameMessageDeleteEvent implements ConceptEvent {
|
export class GameMessageDeleteEvent implements ConceptEvent {
|
||||||
type = 'deleteMessage';
|
type = "deleteMessage";
|
||||||
constructor(public messageId: number) {}
|
constructor(public messageId: number) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GameEndTurnEvent implements ConceptEvent {
|
export class GameEndTurnEvent implements ConceptEvent {
|
||||||
type = 'endTurn';
|
type = "endTurn";
|
||||||
constructor(public currentPlayer: PlayerResponseDTO) {
|
constructor(public currentPlayer: PlayerResponseDTO) {
|
||||||
this.currentPlayer = new PlayerResponseDTO(currentPlayer);
|
this.currentPlayer = new PlayerResponseDTO(currentPlayer);
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-8
@@ -1,9 +1,9 @@
|
|||||||
import { GameResponseDTO } from './dto/gameresponse.dto';
|
import { GameResponseDTO } from "./dto/gameresponse.dto";
|
||||||
import { PlayerResponseDTO } from './dto/playerresponse.dto';
|
import { PlayerResponseDTO } from "./dto/playerresponse.dto";
|
||||||
import type { ConceptEvent } from './events';
|
import type { ConceptEvent } from "./events";
|
||||||
|
|
||||||
export class LobbyCreateEvent implements ConceptEvent {
|
export class LobbyCreateEvent implements ConceptEvent {
|
||||||
type = 'create';
|
type = "create";
|
||||||
game: GameResponseDTO;
|
game: GameResponseDTO;
|
||||||
constructor(game: GameResponseDTO) {
|
constructor(game: GameResponseDTO) {
|
||||||
this.game = new GameResponseDTO(game);
|
this.game = new GameResponseDTO(game);
|
||||||
@@ -11,19 +11,19 @@ export class LobbyCreateEvent implements ConceptEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class LobbyStartEvent implements ConceptEvent {
|
export class LobbyStartEvent implements ConceptEvent {
|
||||||
type = 'start';
|
type = "start";
|
||||||
constructor(public game: GameResponseDTO) {
|
constructor(public game: GameResponseDTO) {
|
||||||
this.game = new GameResponseDTO(game);
|
this.game = new GameResponseDTO(game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class LobbyDeleteEvent implements ConceptEvent {
|
export class LobbyDeleteEvent implements ConceptEvent {
|
||||||
type = 'delete';
|
type = "delete";
|
||||||
constructor(public id: number) {}
|
constructor(public id: number) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class LobbyJoinEvent implements ConceptEvent {
|
export class LobbyJoinEvent implements ConceptEvent {
|
||||||
type = 'joingame';
|
type = "joingame";
|
||||||
constructor(
|
constructor(
|
||||||
public player: PlayerResponseDTO,
|
public player: PlayerResponseDTO,
|
||||||
public game: GameResponseDTO,
|
public game: GameResponseDTO,
|
||||||
@@ -34,7 +34,7 @@ export class LobbyJoinEvent implements ConceptEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class LobbyLeaveEvent implements ConceptEvent {
|
export class LobbyLeaveEvent implements ConceptEvent {
|
||||||
type = 'leavegame';
|
type = "leavegame";
|
||||||
gameId?: number;
|
gameId?: number;
|
||||||
constructor(
|
constructor(
|
||||||
public player: PlayerResponseDTO,
|
public player: PlayerResponseDTO,
|
||||||
|
|||||||
+7
-7
@@ -1,31 +1,31 @@
|
|||||||
import { WordResponseDTO } from './dto/wordresponse.dto';
|
import { WordResponseDTO } from "./dto/wordresponse.dto";
|
||||||
import type { ConceptEvent } from './events';
|
import type { ConceptEvent } from "./events";
|
||||||
|
|
||||||
export class WordCreateEvent implements ConceptEvent {
|
export class WordCreateEvent implements ConceptEvent {
|
||||||
type = 'create';
|
type = "create";
|
||||||
constructor(public word: WordResponseDTO) {
|
constructor(public word: WordResponseDTO) {
|
||||||
this.word = new WordResponseDTO(word);
|
this.word = new WordResponseDTO(word);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class WordEditEvent implements ConceptEvent {
|
export class WordEditEvent implements ConceptEvent {
|
||||||
type = 'edit';
|
type = "edit";
|
||||||
constructor(public word: WordResponseDTO) {
|
constructor(public word: WordResponseDTO) {
|
||||||
this.word = new WordResponseDTO(word);
|
this.word = new WordResponseDTO(word);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class WordDeleteEvent implements ConceptEvent {
|
export class WordDeleteEvent implements ConceptEvent {
|
||||||
type = 'delete';
|
type = "delete";
|
||||||
constructor(public id: number) {}
|
constructor(public id: number) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class WordEnableEvent implements ConceptEvent {
|
export class WordEnableEvent implements ConceptEvent {
|
||||||
type = 'enable';
|
type = "enable";
|
||||||
constructor(public id: number) {}
|
constructor(public id: number) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class WordDisableEvent implements ConceptEvent {
|
export class WordDisableEvent implements ConceptEvent {
|
||||||
type = 'disable';
|
type = "disable";
|
||||||
constructor(public id: number) {}
|
constructor(public id: number) {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user