Class PrepReadinessService

java.lang.Object
dev.deepcore.challenge.session.PrepReadinessService

public final class PrepReadinessService extends Object
Coordinates prep readiness checks and countdown transitions.
  • Constructor Details

    • PrepReadinessService

      public PrepReadinessService(ChallengeConfigView configView, SessionState sessionState, ParticipantsView participantsView, PrepAreaService prepAreaService, PrepBookService prepBookService, PrepCountdownService prepCountdownService, WorldClassificationService worldClassificationService, DeepCoreLogger log)
      Creates a prep readiness service.
      Parameters:
      configView - typed challenge configuration view
      sessionState - mutable session phase and timing state
      participantsView - online/participant query helper
      prepAreaService - prep area border service
      prepBookService - prep book inventory service
      prepCountdownService - countdown scheduling service
      worldClassificationService - world classification helper
      log - logger used for readiness and countdown messages
  • Method Details

    • tryStartCountdown

      public void tryStartCountdown(Set<UUID> readyPlayers, Set<UUID> participants, BooleanSupplier discoPreviewBlocking, Runnable announceDiscoPreviewBlocked, Runnable startRun)
      Attempts to start the prep countdown when readiness conditions are met.
      Parameters:
      readyPlayers - UUIDs currently marked ready
      participants - mutable participant UUID set for the upcoming run
      discoPreviewBlocking - supplier indicating whether disco preview blocks countdown
      announceDiscoPreviewBlocked - action that announces disco preview blocking
      startRun - action that starts the run after countdown completion
    • cancelCountdownIfNoPlayersOnline

      public void cancelCountdownIfNoPlayersOnline(Set<UUID> participants)
      Cancels an active countdown when everyone has disconnected.
      Parameters:
      participants - mutable participant UUID set for the pending run