From e926584b130eb9ed53bb833d931663e3dbd46389 Mon Sep 17 00:00:00 2001 From: Jake Dreher <jdreherschool@gmail.com> Date: Wed, 4 Sep 2024 17:29:02 -0400 Subject: [PATCH] Increase sizes of board and view --- src/game/game.js | 4 ++-- src/models/WebSocketModel.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/game/game.js b/src/game/game.js index 6d0ea7a..e86bf21 100644 --- a/src/game/game.js +++ b/src/game/game.js @@ -303,8 +303,8 @@ module.exports = { getPlayerView: (gameBoard, pid) => { let updatedBoard = gameBoard.map((row) => row.map((cell) => ({ ...cell }))); - let width = 5; - let height = 5; + let width = 11; + let height = 11; let head = null; for (var i = 0; i < updatedBoard.length; i++) { diff --git a/src/models/WebSocketModel.js b/src/models/WebSocketModel.js index e8fae35..76893fe 100644 --- a/src/models/WebSocketModel.js +++ b/src/models/WebSocketModel.js @@ -51,7 +51,7 @@ class WebSocketModel { this.connections = []; this.games = {}; this.games["game1"] = { - gameBoard: gameModule.createGameBoard(10, 10), + gameBoard: gameModule.createGameBoard(100, 100), players: [], type: "public", started: false, @@ -59,7 +59,7 @@ class WebSocketModel { borderCounter: 0, }; this.games["game2"] = { - gameBoard: gameModule.createGameBoard(10, 10), + gameBoard: gameModule.createGameBoard(100, 100), players: [], type: "public", started: false, @@ -67,7 +67,7 @@ class WebSocketModel { borderCounter: 0, }; this.games["game3"] = { - gameBoard: gameModule.createGameBoard(10, 10), + gameBoard: gameModule.createGameBoard(100, 100), players: [], type: "public", started: false, @@ -97,7 +97,7 @@ class WebSocketModel { createGame(gameId, gameType) { this.games[gameId] = { - gameBoard: gameModule.createGameBoard(10, 10), + gameBoard: gameModule.createGameBoard(100, 100), players: [], type: gameType, started: false, -- GitLab