Matches almost done still refining

This commit is contained in:
2026-01-02 21:45:37 +00:00
parent b9df0a4d4a
commit c3f8c3fff0
9 changed files with 468 additions and 30 deletions
+4
View File
@@ -3,6 +3,7 @@ import axios from "axios";
import { handleConnectionEvents } from "./events/connection.js";
import { addUser, removeUser } from "./state/connection.js";
import gameEvents from "./events/game.js";
import matchEvents from "./events/match.js";
export const server = {
io: null,
@@ -43,6 +44,7 @@ export const serverStart = (port) => {
}
socket.user = user;
socket.token = token;
socket.handshake.auth.token = token;
addUser(socket.id, user);
@@ -65,6 +67,8 @@ export const serverStart = (port) => {
server.io.on("connection", (socket) => {
gameEvents(server.io, socket);
matchEvents(server.io, socket);
handleConnectionEvents(server.io, socket);
socket.on("disconnect", () => {