scalata.application.services
Members list
Packages
Type members
Classlikes
Generic factory type-class able to build domain entities.
Generic factory type-class able to build domain entities.
==== Type parameters ====
- F – concrete factory that implements the trait (self-type used for fluent APIs).
- E – entity returned by the factory (e.g.
Enemy,Item). - P – descriptor specifying which concrete subtype to create (enum, string tag, config object …).
Implementations are pure: calling create must not mutate shared state but simply return a fresh instance of E.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Procedural generator that builds one tower floor together with the initial GameSession snapshot for that level.
Procedural generator that builds one tower floor together with the initial GameSession snapshot for that level.
==== Overview ====
- Shuffle room names and arrange them in a
matrixRoomsgrid (rows × columns) so the dungeon is always rectangular. - Create every Room with random padding so shapes vary between runs.
- Populate rooms (except the spawn room) with enemies and items whose number scales with
difficulty. - Insert a Sign in the spawn room and an Exit Door in the last room to let the player advance to the next floor.
- Return a fully initialised GameSession that already contains one entry in the undo history (
GameSession.init).
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
FloorGenerator.type
Immutable builder that assembles a complete GameSession.
Immutable builder that assembles a complete GameSession.
==== Parameters ====
- player optional hero to start the run with; must be supplied before calling build.
- difficulty global difficulty level (1–10).
- level tower floor to generate (starts at
1).
All mutator methods are pure: they return a new GameBuilder instance without mutating the original one.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Mutable-looking, yet immutable, holder of the current finite-state-machine phase.
Mutable-looking, yet immutable, holder of the current finite-state-machine phase.
==== Responsibilities ====
- Expose the current phase through
getCurrentPhase. - Create a new instance with an updated phase via
transitionTo(pure copy, no mutation).
This minimal wrapper exists so that the GameEngine can pass a single value around and still treat the phase as a first-class object.
Value parameters
- currentPhase
-
FSM node the game is presently in; defaults to
GameControllerState.Menu.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Abstract UI bridge.
Abstract UI bridge.
The trait is effect-polymorphic: every action yields a value in the effect F[_] (e.g. IO).
Type parameters
- F
-
effect type constructor (
cats.effect.IO, etc.) - I
-
raw input representation (e.g.
String, scan-coded key, structured AST)
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class ConsoleView[F]class JLineView[F]