mirror of
https://github.com/AlecM33/Werewolf.git
synced 2026-02-10 04:03:33 +01:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user