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
@@ -0,0 +1,22 @@
const SocketUser = require("../../../../Classes/SocketUser");
const Playground = require("../Playground/Playground");
class Snake{
/** @param {SocketUser} player @param {Playground} playground */
constructor(player, playground, color, startTiles) {
this.player = player;
this.playground = playground;
this.color = color;
this.tiles = [];
this.nextMovement = null;
this.player.socket.on("movement", (data) => { this.updateNextMovement(data) })
}
updateNextMovement(data){
}
}
module.exports = Snake;