From 7b66e5612a8e7f402c2924dc0246018851b353c4 Mon Sep 17 00:00:00 2001 From: vvandenb Date: Fri, 10 Mar 2023 17:22:34 +0100 Subject: [PATCH] * Removed map size in game creation in backend --- back/volume/src/pong/game/Games.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/back/volume/src/pong/game/Games.ts b/back/volume/src/pong/game/Games.ts index da1458a..87a41f6 100644 --- a/back/volume/src/pong/game/Games.ts +++ b/back/volume/src/pong/game/Games.ts @@ -7,6 +7,7 @@ import { type GameInfo } from '../dtos/GameInfo' import { type PongService } from '../pong.service' import { DEFAULT_BALL_SIZE, + DEFAULT_MAP_SIZE, DEFAULT_PADDLE_SIZE, DEFAULT_PLAYER_X_OFFSET, DEFAULT_WIN_SCORE @@ -23,7 +24,10 @@ export class Games { gameCreationDto: GameCreationDtoValidated ): void { const names: string[] = gameCreationDto.playerNames - const map: GameMap = gameCreationDto.map + const map: GameMap = { + size: DEFAULT_MAP_SIZE, + walls: gameCreationDto.map.walls + } if (!this.isInAGame(names[0]) && !this.isInAGame(names[1])) { this.games.push( new Game(