scalata.application.usecases

Members list

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 Object
trait Matchable
class Any
trait CreatureUseCase[U, P]

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 current GameSession and returns an updated value of type U.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Handles the Game Over prompt (“Restart?”).

Handles the Game Over prompt (“Restart?”).

Attributes

Supertypes
class Object
trait Matchable
class 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 Object
trait Matchable
class 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.ChampSelectfalse → return a GameError.GameOver

Attributes

Supertypes
class Object
trait Matchable
class Any