Room
scalata.domain.world.Room
Immutable description of a rectangular room on a floor.
==== Structure ====
-
id unique room identifier (used by world graph).
-
topLeft / botRight corner coordinates that delimit the rectangle.
-
exits map
Direction → roomIdfor door connectivity. -
items loot on the ground.
-
enemies creatures currently inhabiting the room.
==== Main operations ====
- Geometry helpers (
size, border checks,isInside). - Topology helpers (
getNeighbor,getDoorPosition). - Pure mutators that return a new room (
withItems,withEnemies,removeItem). - Queries for entities at a given coordinate.
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article