GameController
scalata.infrastructure.controller.GameController
class GameController[F[_]](askCommand: GameSession => F[PlayerCommand])(implicit evidence$1: Sync[F]) extends Controller[F]
Controller that manages the Game-Running state.
- Builds an initial GameSession from the supplied GameBuilder.
- Runs the main turn loop by delegating to GameRunningUseCase.
- Handles
Success/Erroroutcomes and decides the next GameControllerState.
Type parameters
- F
-
effect type, usually
IO
Value parameters
- askCommand
-
side-effecting function that retrieves a PlayerCommand from the active view.
Attributes
- Graph
-
- Supertypes
Members list
In this article