scalata.application.usecases
Members list
Packages
Type members
Classlikes
Use-case that concludes champion selection by creating the player and moving the finite-state machine to the Game-Running phase.
Use-case that concludes champion selection by creating the player and moving the finite-state machine to the Game-Running phase.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Generic action performed by a creature (player, enemy).
Generic action performed by a creature (player, enemy).
-
U – result type returned by the action.
-
P – parameter consumed by the action (direction, item name, …).
-
execute– pure function; takes the currentGameSessionand returns an updated value of type U.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class EnemyAttackUseCaseclass EnemyMovementUseCaseclass PlayerAttackUseCaseclass PlayerInteractUseCaseclass PlayerInventoryUseCaseclass PlayerMovementUseCaseShow all
Handles the Game Over prompt (“Restart?”).
Handles the Game Over prompt (“Restart?”).
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Use-case that executes a full game turn:
Use-case that executes a full game turn:
==== Flow ====
-
Parse player command → run the matching player use-case.
-
On success → apply two enemy phases in order:
-
EnemyAttackUseCase -
EnemyMovementUseCase -
Error commands (quit / undo / help) return a corresponding
GameError.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Use-case that handles the “Start Game?” choice shown in the main menu.
Use-case that handles the “Start Game?” choice shown in the main menu.
• true → transition to GameControllerState.ChampSelect • false → return a GameError.GameOver
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any