Refactored code to remove useless classes, fix #17

This commit is contained in:
2024-06-10 18:06:00 +00:00
parent 4f9608d25d
commit 21e6f31c15
7 changed files with 137 additions and 146 deletions

View File

@@ -1,5 +1,7 @@
import { secureAdminBroadcast } from "./admin_socket.js";
import { io, game } from "./index.js";
import { io} from "./index.js";
import game from "./game.js";
import zone from "./zone_manager.js";
/**
* Send a socket message to all the players of a team
@@ -79,10 +81,10 @@ export function initTeamSocket() {
socket.emit("login_response", true);
socket.emit("game_state", game.state)
socket.emit("game_settings", game.settings)
socket.emit("zone", game.zone.currentZone)
socket.emit("zone", zone.currentZone)
socket.emit("new_zone", {
begin: game.zone.currentStartZone,
end: game.zone.nextZone
begin: zone.currentStartZone,
end: zone.nextZone
})
});