FloorGenerator
scalata.application.services.FloorGenerator
object FloorGenerator
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
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
FloorGenerator.type
Members list
In this article