diff --git a/back/volume/src/chat/chat.service.ts b/back/volume/src/chat/chat.service.ts index 479abea..f5d28c2 100644 --- a/back/volume/src/chat/chat.service.ts +++ b/back/volume/src/chat/chat.service.ts @@ -118,10 +118,8 @@ export class ChatService { @Cron('*/6 * * * * *') async updateBanlists (): Promise { - console.log('checking bans') const channels = await this.ChannelRepository.find({}) for (const channel of channels) { - console.log((channel.banned.length) > 0) channel.banned = channel.banned.filter((data) => { return Date.now() - data[1] > 0 }) diff --git a/back/volume/src/pong/dtos/GameInfo.ts b/back/volume/src/pong/dtos/GameInfo.ts index 95f36f7..1a42151 100644 --- a/back/volume/src/pong/dtos/GameInfo.ts +++ b/back/volume/src/pong/dtos/GameInfo.ts @@ -9,4 +9,5 @@ export class GameInfo { ballSize!: Point winScore!: number ranked!: boolean + playerNames!: string[] } diff --git a/back/volume/src/pong/game/Game.ts b/back/volume/src/pong/game/Game.ts index 46b3ed5..322713e 100644 --- a/back/volume/src/pong/game/Game.ts +++ b/back/volume/src/pong/game/Game.ts @@ -63,7 +63,8 @@ export class Game { paddleSize: DEFAULT_PADDLE_SIZE, ballSize: DEFAULT_BALL_SIZE, winScore: DEFAULT_WIN_SCORE, - ranked: this.ranked + ranked: this.ranked, + playerNames: this.players.map((p) => p.name) } } diff --git a/back/volume/src/pong/game/Games.ts b/back/volume/src/pong/game/Games.ts index fdd5efc..d1feca6 100644 --- a/back/volume/src/pong/game/Games.ts +++ b/back/volume/src/pong/game/Games.ts @@ -85,7 +85,8 @@ export class Games { paddleSize: DEFAULT_PADDLE_SIZE, ballSize: DEFAULT_BALL_SIZE, winScore: DEFAULT_WIN_SCORE, - ranked: false + ranked: false, + playerNames: [] } } diff --git a/front/volume/src/components/Pong/Game.ts b/front/volume/src/components/Pong/Game.ts index 14cb2d9..61b2fc1 100644 --- a/front/volume/src/components/Pong/Game.ts +++ b/front/volume/src/components/Pong/Game.ts @@ -72,7 +72,7 @@ export class Game { ), data.paddleSize ); - this.players = [new Player(paddle1), new Player(paddle2)]; + this.players = [new Player(paddle1, data.playerNames[0]), new Player(paddle2, data.playerNames[1])]; if (data.yourPaddleIndex != -1) this.my_paddle = this.players[data.yourPaddleIndex].paddle; this.id = data.gameId; diff --git a/front/volume/src/components/Pong/GameComponent.svelte b/front/volume/src/components/Pong/GameComponent.svelte index a951ab3..83fff91 100644 --- a/front/volume/src/components/Pong/GameComponent.svelte +++ b/front/volume/src/components/Pong/GameComponent.svelte @@ -1,6 +1,7 @@ -