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 / Error outcomes 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
trait Controller[F]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

final override def start(gameBuilder: GameBuilder): F[GameResult[(GameControllerState, GameBuilder)]]

Entry-point called by the GameEngine.

Entry-point called by the GameEngine.

Attributes

Definition Classes