Remove unused getTimeRemaining function from GameManager

- Function is no longer called after refactoring GET_TIME_REMAINING into handleTimerCommand
- All timer time remaining logic now handled in Events.js handleTimerCommand switch case
- Tests still passing

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-24 16:12:48 +00:00
parent 65e4c588b1
commit c466779085

View File

@@ -167,27 +167,6 @@ class GameManager {
return null;
};
getTimeRemaining = async (game, socketId) => {
if (socketId) {
const timer = this.timers[game.accessCode];
if (timer) {
this.namespace.to(socketId).emit(
GAME_PROCESS_COMMANDS.GET_TIME_REMAINING,
timer.currentTimeInMillis,
game.timerParams ? game.timerParams.paused : false
);
} else {
const timeRemaining = game.timerParams ? game.timerParams.timeRemaining : 0;
const paused = game.timerParams ? game.timerParams.paused : false;
this.namespace.to(socketId).emit(
GAME_PROCESS_COMMANDS.GET_TIME_REMAINING,
timeRemaining,
paused
);
}
}
};
checkAvailability = async (code) => {
const game = await this.getActiveGame(code.toUpperCase().trim());
if (game) {