scalata.domain.world.GameSession
See theGameSession companion object
final case class GameSession(world: World, gameState: GameState, history: NonEmptyList[(World, GameState)])
Immutable wrapper that couples a World with its GameState and keeps an undo history.
==== Fields ====
-
world current game world (rooms, player, difficulty).
-
gameState progress on the current run.
-
history non-empty list of previous snapshots, newest first, used for the
undofeature.
All “update” methods return a new GameSession; nothing is mutated in place.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article