Snake Movement Handler Setup

This commit is contained in:
2025-04-10 09:24:57 +02:00
parent dcea0d24f5
commit 32681f20ca
6 changed files with 81 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
import Loop from "./Loop.js";
import UIManager from "./UI/UIManager.js";
import Playground from "./Elements/Playground.js";
import MovementHandler from "./Elements/MovementHandler.js";
class Game{
/**@param {import("../../../../backend/node_modules/socket.io-client".Socket} socket Autocompletions VSC*/
@@ -9,6 +10,7 @@ class Game{
this.loop = new Loop(this.socket, this);
this.uiManager = new UIManager();
this.movementHandler = undefined;
this.playGround = undefined;
this.gameStarted = false;
@@ -20,6 +22,7 @@ class Game{
this.gameStarted = true;
this.uiManager.loadGameContent();
this.movementHandler = new MovementHandler(this.socket);
this.playGround = new Playground(this, this.uiManager, playgroundSize);
}
}