Matches almost done still refining
This commit is contained in:
@@ -14,4 +14,4 @@ export const removeUser = (socketId) => {
|
||||
|
||||
export const getUserCount = () => {
|
||||
return users.size;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import BiscaGame from '../classes/BiscaGame.js';
|
||||
import BiscaGame from "../classes/BiscaGame.js";
|
||||
|
||||
const activeGames = new Map();
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
const matches = new Map();
|
||||
|
||||
export const addMatch = (match) => {
|
||||
matches.set(parseInt(match.id), match);
|
||||
return match;
|
||||
};
|
||||
|
||||
export const getMatch = (id) => {
|
||||
return matches.get(parseInt(id));
|
||||
};
|
||||
|
||||
export const removeMatch = (id) => {
|
||||
matches.delete(parseInt(id));
|
||||
};
|
||||
|
||||
export { matches };
|
||||
Reference in New Issue
Block a user