chore: formatting

This commit is contained in:
2025-05-06 14:36:52 +02:00
parent 913c82994a
commit ccd11f29a1
4 changed files with 26 additions and 26 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
export class UserResponseDTO {
constructor(partial: Partial<UserResponseDTO>) {
constructor(partial: UserResponseDTO) {
this.id = partial.id;
this.username = partial.username;
this.avatar = partial.avatar;
+10 -10
View File
@@ -1,46 +1,46 @@
import { MessageResponseDTO } from './dto/messageresponse.dto';
import { PlayerResponseDTO } from './dto/playerresponse.dto';
import type { ConceptEvent } from './events';
import { MessageResponseDTO } from "./dto/messageresponse.dto";
import { PlayerResponseDTO } from "./dto/playerresponse.dto";
import type { ConceptEvent } from "./events";
export class GameStartEvent implements ConceptEvent {
type = 'start';
type = "start";
constructor(public currentPlayer: PlayerResponseDTO) {
this.currentPlayer = new PlayerResponseDTO(currentPlayer);
}
}
export class GameDeleteEvent implements ConceptEvent {
type = 'delete';
type = "delete";
}
export class GameJoinEvent implements ConceptEvent {
type = 'joingame';
type = "joingame";
constructor(public player: PlayerResponseDTO) {
this.player = new PlayerResponseDTO(player);
}
}
export class GameLeaveEvent implements ConceptEvent {
type = 'leavegame';
type = "leavegame";
constructor(public player: PlayerResponseDTO) {
this.player = new PlayerResponseDTO(player);
}
}
export class GameMessageEvent implements ConceptEvent {
type = 'message';
type = "message";
constructor(public message: MessageResponseDTO) {
this.message = new MessageResponseDTO(message);
}
}
export class GameMessageDeleteEvent implements ConceptEvent {
type = 'deleteMessage';
type = "deleteMessage";
constructor(public messageId: number) {}
}
export class GameEndTurnEvent implements ConceptEvent {
type = 'endTurn';
type = "endTurn";
constructor(public currentPlayer: PlayerResponseDTO) {
this.currentPlayer = new PlayerResponseDTO(currentPlayer);
}
+8 -8
View File
@@ -1,9 +1,9 @@
import { GameResponseDTO } from './dto/gameresponse.dto';
import { PlayerResponseDTO } from './dto/playerresponse.dto';
import type { ConceptEvent } from './events';
import { GameResponseDTO } from "./dto/gameresponse.dto";
import { PlayerResponseDTO } from "./dto/playerresponse.dto";
import type { ConceptEvent } from "./events";
export class LobbyCreateEvent implements ConceptEvent {
type = 'create';
type = "create";
game: GameResponseDTO;
constructor(game: GameResponseDTO) {
this.game = new GameResponseDTO(game);
@@ -11,19 +11,19 @@ export class LobbyCreateEvent implements ConceptEvent {
}
export class LobbyStartEvent implements ConceptEvent {
type = 'start';
type = "start";
constructor(public game: GameResponseDTO) {
this.game = new GameResponseDTO(game);
}
}
export class LobbyDeleteEvent implements ConceptEvent {
type = 'delete';
type = "delete";
constructor(public id: number) {}
}
export class LobbyJoinEvent implements ConceptEvent {
type = 'joingame';
type = "joingame";
constructor(
public player: PlayerResponseDTO,
public game: GameResponseDTO,
@@ -34,7 +34,7 @@ export class LobbyJoinEvent implements ConceptEvent {
}
export class LobbyLeaveEvent implements ConceptEvent {
type = 'leavegame';
type = "leavegame";
gameId?: number;
constructor(
public player: PlayerResponseDTO,
+7 -7
View File
@@ -1,31 +1,31 @@
import { WordResponseDTO } from './dto/wordresponse.dto';
import type { ConceptEvent } from './events';
import { WordResponseDTO } from "./dto/wordresponse.dto";
import type { ConceptEvent } from "./events";
export class WordCreateEvent implements ConceptEvent {
type = 'create';
type = "create";
constructor(public word: WordResponseDTO) {
this.word = new WordResponseDTO(word);
}
}
export class WordEditEvent implements ConceptEvent {
type = 'edit';
type = "edit";
constructor(public word: WordResponseDTO) {
this.word = new WordResponseDTO(word);
}
}
export class WordDeleteEvent implements ConceptEvent {
type = 'delete';
type = "delete";
constructor(public id: number) {}
}
export class WordEnableEvent implements ConceptEvent {
type = 'enable';
type = "enable";
constructor(public id: number) {}
}
export class WordDisableEvent implements ConceptEvent {
type = 'disable';
type = "disable";
constructor(public id: number) {}
}