Skip to content

Integrate command execution with game phases (queue, pause, resume) #231

@jasonappah

Description

@jasonappah

Objective: Align command queuing/execution with game lifecycle phases so commands are safely paused/queued during non-running phases and resumed appropriately.

Context:

  • Update src/server/command/* and src/server/api/game-manager.ts to respect game phases; consider a centralized gate/guard.
  • Ensure APIs and sockets (src/server/api/socket-manager.ts) communicate when commands are accepted vs held.

Acceptance:

  • Commands during non-running phases are not executed but either rejected with a clear reason or queued until resume—policy documented in the code.
  • On resume, queued commands are executed in order; cancellation semantics documented.
  • Unit tests cover transitions pause→resume and resume→pause mid-queue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    D2Medium DifficultyP2Medium PriorityS26Current relevant issue that should be worked on in the spring 2026 semester

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions