# jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965 architecture

> Architecture diagram of the GitHub repository jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965
- Repository: https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965

## Overview

This repository is a .NET console game with a clear layered separation between orchestration, domain logic, content loading, and console rendering.

At the top level, the solution is split into four main projects plus the executable:

- TempleOfDoom: the console application entry point
- TempleOfDoom.Controllers: game orchestration and user-input handling
- TempleOfDoom.Models: the domain model and game rules
- TempleOfDoom.Services: level loading, parsing, and object construction
- TempleOfDoom.View: console rendering and object-to-text mapping

#### Runtime shape

The game starts in `Program.cs` inside the executable project. From there, the application is assembled from controllers, services, the domain model, and the console view. This is not a web app or client-server system; it is a single-process interactive console game with a loop driven by keyboard input and game-state updates.

#### Main subsystems

##### 1) Game orchestration and flow control
The `TempleOfDoom.Controllers` project appears to be the application’s coordination layer:

- `GameSetupController` initializes a new game session
- `GameFlowController` likely owns the main gameplay loop and turn progression
- `InputController` translates raw keyboard input into game actions
- `InteractionController` handles in-game consequences such as collisions, pickups, triggers, and door/room interactions

This layer is where the game’s high-level flow is managed. It does not appear to contain core domain rules itself; instead, it coordinates the model and invokes services/view as needed.

##### 2) Domain model
The `TempleOfDoom.Models` project contains the game’s core state and behavior.

###### Game objects
The model is built around a hierarchy of in-game objects:

- Entities:
  - `Player`
  - `BaseEntity`
- Floor and map elements:
  - `FloorTile`
  - `Wall`
  - `ConnectionTile`
  - special floor tiles such as `Portal`, `ConveyorBelt`, and generic `Tile`
- Items and triggers:
  - `Key`
  - `SankaraStone`
  - `Boobytrap`
  - `DisappearingBoobytrap`
  - `PressurePlate`
- Doors:
  - `Door`
  - decorator-based door variants such as:
    - `ColoredDoorDecorator`
    - `ToggleDoorDecorator`
    - `OpenOnOddDoorDecorator`
    - `OpenOnStonesInRoomDoorDecorator`
    - `ClosingGateDoorDecorator`

###### Level structure
The world is organized into:

- `Level`
- `Room`

This suggests a room-based dungeon layout, with rooms composed of tiles, doors, items, and entities.

###### Interfaces and contracts
The model uses interfaces to define behavior boundaries:

- `IEntity`, `IMovable`
- `IInteractable`, `ITriggerItem`, `IItem`
- `ITile`, `ITileContent`
- `IDoor`
- `IUpdatable`

There is also an Observer abstraction:

- `IObservable`
- `IObserver`

That likely supports state-change notifications, probably from model objects to the view or controller layer.

###### Enums and shared state
Several enums define the game vocabulary:

- `Direction`
- `PlayerAction`
- `Condition`
- `Color`
- `FileType`

These are important for the architecture because they show that movement, interaction, parsing, and door logic are all represented explicitly in the model rather than being implicit strings or ad hoc values.

##### 3) Content loading and level construction
The `TempleOfDoom.Services` project is responsible for getting a playable level into memory.

###### File parsing strategy
The repository includes both JSON and XML level definitions:

- `TempleOfDoom_Extended_B_2122.json`
- `TempleOfDoom_XML.xml`

The services layer supports this through a Strategy pattern:

- `IFileParserStrategy`
- `JSONFileParser`
- `XMLFileParser`
- `FileParserFactory`

This means the application can choose a parser based on file type and parse multiple level formats through a common abstraction.

###### Factories
Several factories assemble the domain objects from parsed data:

- `RoomFactory`
- `TileFactory`
- `DoorFactory`
- `ItemFactory`
- `EnemyFactory`

These factories are the construction boundary between raw parsed content and fully formed model objects. They keep object-creation logic out of the controllers and probably out of the parsers as well.

###### Level service and file I/O
- `FileReader` handles file access
- `LevelService` likely coordinates parsing and factory usage to build a `Level`

The services layer therefore sits between external content files and the in-memory game world.

##### 4) Console rendering
The `TempleOfDoom.View` project handles presentation to the terminal.

Key components:

- `ConsoleView`
- `GameObjectToRepresentationMapper`
- `Representation`

The mapping layer suggests that domain objects are converted into lightweight visual representations before being written to the console. That keeps rendering concerns separate from the game object model.

Because this is a console game, the view boundary is important: the game state must be translated into characters/symbols suitable for terminal output rather than UI widgets.

#### Data flow through the system

A typical flow looks like this:

1. `Program.cs` starts the game and wires the application together.
2. `GameSetupController` loads a level through `LevelService`.
3. `LevelService` uses `FileReader`, `FileParserFactory`, and a JSON/XML parser strategy to read a level file.
4. The parser and factories build `Level`, `Room`, `Tile`, `Door`, `Item`, and entity objects.
5. `GameFlowController` runs the main loop.
6. `InputController` reads arrow-key input and turns it into a `PlayerAction` or `Direction`.
7. `InteractionController` applies movement and game rules, updating the model.
8. The model changes may notify observers through the Observer interfaces.
9. `ConsoleView` renders the current state by mapping game objects to `Representation` values.

#### Important architectural boundaries

##### Controller vs. model
Controllers orchestrate gameplay, but the rules and state live in the model. This keeps the core logic reusable and testable outside of console I/O.

##### Services vs. model
Services are responsible for loading and constructing objects, not for enforcing gameplay rules. The model owns the meaning of doors, tiles, items, and movement.

##### View vs. model
The view consumes the model and produces console output, but should not encode game logic. The mapper is the translation boundary.

##### Parsing vs. construction
Parsing reads raw file structures; factories turn that data into proper game objects. That two-step split is a key part of the architecture.

#### Design patterns in context

The README lists several patterns, and the file tree confirms they are central to the design:

- Factory: used throughout the services layer to build game objects
- Decorator: used for doors to compose behavior such as color, toggling, gating, and conditional opening
- Strategy: used for JSON vs. XML file parsing
- Adapter: `EnemyAdapter` and `FieldAdapter` isolate external or incompatible data shapes from the model
- Observer: used for notifying interested parties when game state changes

#### Repository-specific architecture summary

This is a layered, room-based dungeon crawler implemented as a .NET console application. The executable bootstraps a controller-driven game loop. The services layer loads level content from JSON/XML and constructs the world using factories and parser strategies. The models layer contains the actual game rules and object hierarchy, including rooms, tiles, doors, items, and the player. The view layer turns model state into console output. Observer and decorator patterns are used to keep world behavior composable and reactive, especially for doors and state updates.

If you want to draw an architecture diagram, the most important boxes are:

- Console entry point
- Controllers for setup, flow, input, and interaction
- Services for file reading, parsing, and object creation
- Models for all game entities and level structure
- View for console rendering

And the most important arrows are:

- entry point to controllers
- controllers to services and models
- services to model construction
- model to view, likely via observer notifications and representation mapping

Main entry points: [`TempleOfDoom/TempleOfDoom.Services/LevelService.cs`](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/LevelService.cs) (Level Service), [`TempleOfDoom/TempleOfDoom.Models/LevelStructure/Room.cs`](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/LevelStructure/Room.cs) (Room), [`TempleOfDoom/TempleOfDoom.Models/LevelStructure/Level.cs`](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/LevelStructure/Level.cs) (Level), [`TempleOfDoom/TempleOfDoom.Models/Interfaces/IEntity.cs`](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/Interfaces/IEntity.cs) (Contracts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App"]
  node_program["Program<br/>entry point<br/>[Program.cs]"]
end

subgraph group_controllers["Controllers"]
  node_game_setup["Game Setup<br/>controller"]
  node_game_flow["Game Flow<br/>controller"]
  node_input["Input<br/>controller<br/>[InputController.cs]"]
  node_interaction["Interaction<br/>controller"]
end

subgraph group_models["Models"]
  node_level_model["Level<br/>world model<br/>[Level.cs]"]
  node_room_model["Room<br/>world model<br/>[Room.cs]"]
  node_entity_model["Entities<br/>domain objects<br/>[BaseEntity.cs]"]
  node_tile_model["Tiles<br/>domain objects<br/>[FloorTile.cs]"]
  node_door_model["Doors<br/>domain objects<br/>[Door.cs]"]
  node_item_model["Items<br/>domain objects<br/>[Key.cs]"]
  node_contracts["Contracts<br/>interfaces<br/>[IEntity.cs]"]
end

subgraph group_services["Services"]
  node_level_service["Level Service<br/>[LevelService.cs]"]
  node_file_reader["File Reader<br/>io<br/>[FileReader.cs]"]
  node_parser_factory["Parser Factory"]
  node_json_parser["JSON Parser<br/>strategy<br/>[JSONFileParser.cs]"]
  node_xml_parser["XML Parser<br/>strategy<br/>[XMLFileParser.cs]"]
  node_room_factory["Room Factory<br/>[RoomFactory.cs]"]
  node_tile_factory["Tile Factory<br/>[TileFactory.cs]"]
  node_door_factory["Door Factory<br/>[DoorFactory.cs]"]
  node_item_factory["Item Factory<br/>[ItemFactory.cs]"]
end

subgraph group_view["View"]
  node_view_mapper["Mapper"]
  node_console_view["Console View<br/>renderer<br/>[ConsoleView.cs]"]
  node_representation["Representation<br/>view model<br/>[Representation.cs]"]
end

node_program -->|"bootstraps"| node_game_setup
node_program -->|"creates"| node_console_view
node_game_setup -->|"loads level"| node_level_service
node_game_setup -->|"starts flow"| node_game_flow
node_game_flow -->|"reads input"| node_input
node_game_flow -->|"applies actions"| node_interaction
node_interaction -->|"updates"| node_level_model
node_input -->|"maps actions"| node_interaction
node_level_service -->|"reads files"| node_file_reader
node_level_service -->|"selects parser"| node_parser_factory
node_parser_factory -->|"chooses"| node_json_parser
node_parser_factory -->|"chooses"| node_xml_parser
node_level_service -->|"builds rooms"| node_room_factory
node_level_service -->|"builds tiles"| node_tile_factory
node_level_service -->|"builds doors"| node_door_factory
node_level_service -->|"builds items"| node_item_factory
node_room_factory -->|"creates"| node_room_model
node_tile_factory -->|"creates"| node_tile_model
node_door_factory -->|"creates"| node_door_model
node_item_factory -->|"creates"| node_item_model
node_level_service -->|"assembles"| node_level_model
node_level_model -->|"contains"| node_room_model
node_room_model -->|"contains"| node_tile_model
node_room_model -->|"links"| node_door_model
node_room_model -->|"hosts"| node_entity_model
node_room_model -->|"contains"| node_item_model
node_entity_model -->|"implements"| node_contracts
node_tile_model -->|"implements"| node_contracts
node_door_model -->|"implements"| node_contracts
node_item_model -->|"implements"| node_contracts
node_level_model -->|"rendered by"| node_console_view
node_level_model -->|"mapped for view"| node_view_mapper
node_view_mapper -->|"produces"| node_representation
node_console_view -->|"renders"| node_representation

click node_program "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom/Program.cs"
click node_game_setup "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Controllers/GameSetupController.cs"
click node_game_flow "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Controllers/GameFlowController.cs"
click node_input "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Controllers/InputController.cs"
click node_interaction "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Controllers/InteractionController.cs"
click node_level_service "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/LevelService.cs"
click node_file_reader "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/FileReader.cs"
click node_parser_factory "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Factories/FileParserFactory.cs"
click node_json_parser "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Parsers/JSONFileParser.cs"
click node_xml_parser "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Parsers/XMLFileParser.cs"
click node_room_factory "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Factories/RoomFactory.cs"
click node_tile_factory "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Factories/TileFactory.cs"
click node_door_factory "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Factories/DoorFactory.cs"
click node_item_factory "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Factories/ItemFactory.cs"
click node_level_model "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/LevelStructure/Level.cs"
click node_room_model "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/LevelStructure/Room.cs"
click node_entity_model "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/GameObjects/Entities/BaseEntity.cs"
click node_tile_model "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/GameObjects/FloorTiles/FloorTile.cs"
click node_door_model "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/GameObjects/Doors/Door.cs"
click node_item_model "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/GameObjects/Items/Key.cs"
click node_contracts "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/Interfaces/IEntity.cs"
click node_view_mapper "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.View/GameObjectToRepresentationMapper.cs"
click node_console_view "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.View/ConsoleView.cs"
click node_representation "https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.View/Representation.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_program toneBlue
class node_game_setup,node_game_flow,node_input,node_interaction toneAmber
class node_level_model,node_room_model,node_entity_model,node_tile_model,node_door_model,node_item_model,node_contracts toneMint
class node_level_service,node_file_reader,node_parser_factory,node_json_parser,node_xml_parser,node_room_factory,node_tile_factory,node_door_factory,node_item_factory toneRose
class node_view_mapper,node_console_view,node_representation toneIndigo
```

## Components

### App

Executable bootstrap and console runtime.

- [Program](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom/Program.cs): entry point · Console application bootstrap. · `TempleOfDoom/TempleOfDoom/Program.cs`

### Controllers

Gameplay orchestration and input handling.

- [Game Setup](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Controllers/GameSetupController.cs): controller · Initial game session assembly. · `TempleOfDoom/TempleOfDoom.Controllers/GameSetupController.cs`
- [Game Flow](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Controllers/GameFlowController.cs): controller · Main gameplay loop and turn progression. · `TempleOfDoom/TempleOfDoom.Controllers/GameFlowController.cs`
- [Input](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Controllers/InputController.cs): controller · Translates keyboard input into actions. · `TempleOfDoom/TempleOfDoom.Controllers/InputController.cs`
- [Interaction](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Controllers/InteractionController.cs): controller · Applies collisions, pickups, triggers, and movement outcomes. · `TempleOfDoom/TempleOfDoom.Controllers/InteractionController.cs`

### Models

Core domain objects, contracts, and rules.

- [Level](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/LevelStructure/Level.cs): world model · Top-level dungeon structure. · `TempleOfDoom/TempleOfDoom.Models/LevelStructure/Level.cs`
- [Room](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/LevelStructure/Room.cs): world model · Room-level container for tiles and objects. · `TempleOfDoom/TempleOfDoom.Models/LevelStructure/Room.cs`
- [Entities](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/GameObjects/Entities/BaseEntity.cs): domain objects · Player and base entity behavior. · `TempleOfDoom/TempleOfDoom.Models/GameObjects/Entities/BaseEntity.cs`
- [Tiles](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/GameObjects/FloorTiles/FloorTile.cs): domain objects · Floor, wall, connection, and special tiles. · `TempleOfDoom/TempleOfDoom.Models/GameObjects/FloorTiles/FloorTile.cs`
- [Doors](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/GameObjects/Doors/Door.cs): domain objects · Door behavior plus decorator variants. · `TempleOfDoom/TempleOfDoom.Models/GameObjects/Doors/Door.cs`
- [Items](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/GameObjects/Items/Key.cs): domain objects · Keys, stones, traps, and pressure plates. · `TempleOfDoom/TempleOfDoom.Models/GameObjects/Items/Key.cs`
- [Contracts](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Models/Interfaces/IEntity.cs): interfaces · Behavior boundaries for movement, interaction, updating, and observers. · `TempleOfDoom/TempleOfDoom.Models/Interfaces/IEntity.cs`

### Services

File loading, parsing, and world construction.

- [Level Service](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/LevelService.cs): service · Coordinates level loading and construction. · `TempleOfDoom/TempleOfDoom.Services/LevelService.cs`
- [File Reader](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/FileReader.cs): io · Reads raw level files from disk. · `TempleOfDoom/TempleOfDoom.Services/FileReader.cs`
- [Parser Factory](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Factories/FileParserFactory.cs): factory · Selects a parser strategy by file type. · `TempleOfDoom/TempleOfDoom.Services/Factories/FileParserFactory.cs`
- [JSON Parser](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Parsers/JSONFileParser.cs): strategy · Parses JSON level content. · `TempleOfDoom/TempleOfDoom.Services/Parsers/JSONFileParser.cs`
- [XML Parser](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Parsers/XMLFileParser.cs): strategy · Parses XML level content. · `TempleOfDoom/TempleOfDoom.Services/Parsers/XMLFileParser.cs`
- [Room Factory](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Factories/RoomFactory.cs): factory · Builds rooms from parsed data. · `TempleOfDoom/TempleOfDoom.Services/Factories/RoomFactory.cs`
- [Tile Factory](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Factories/TileFactory.cs): factory · Builds tiles and floor content. · `TempleOfDoom/TempleOfDoom.Services/Factories/TileFactory.cs`
- [Door Factory](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Factories/DoorFactory.cs): factory · Builds doors and door variants. · `TempleOfDoom/TempleOfDoom.Services/Factories/DoorFactory.cs`
- [Item Factory](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.Services/Factories/ItemFactory.cs): factory · Builds items and trigger objects. · `TempleOfDoom/TempleOfDoom.Services/Factories/ItemFactory.cs`

### View

Console presentation and object representation.

- [Mapper](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.View/GameObjectToRepresentationMapper.cs): presentation mapper · Converts game objects into renderable representations. · `TempleOfDoom/TempleOfDoom.View/GameObjectToRepresentationMapper.cs`
- [Console View](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.View/ConsoleView.cs): renderer · Writes the game state to the terminal. · `TempleOfDoom/TempleOfDoom.View/ConsoleView.cs`
- [Representation](https://github.com/jaydielemans/temple-of-doom-herkansing-januari-2026-module-b-2171965/blob/main/TempleOfDoom/TempleOfDoom.View/Representation.cs): view model · Lightweight console-facing visual form. · `TempleOfDoom/TempleOfDoom.View/Representation.cs`

## Connections

- Program → Game Setup: bootstraps · Program starts the game assembly and setup.
- Program → Console View: creates · Application wires in console rendering.
- Game Setup → Level Service: loads level · Initial session setup requests a playable level.
- Game Setup → Game Flow: starts flow · Setup hands control to the main loop.
- Game Flow → Input: reads input · Main loop polls player actions.
- Game Flow → Interaction: applies actions · Gameplay progression is resolved through interactions.
- Interaction → Level: updates · Interactions mutate the world state.
- Input → Interaction: maps actions · Raw input is turned into movement and action requests.
- Level Service → File Reader: reads files · Level loading begins with file access.
- Level Service → Parser Factory: selects parser · File type determines parser strategy.
- Parser Factory → JSON Parser: chooses · JSON content is parsed via strategy.
- Parser Factory → XML Parser: chooses · XML content is parsed via strategy.
- Level Service → Room Factory: builds rooms · Parsed room data is assembled into domain objects.
- Level Service → Tile Factory: builds tiles · Tile data is turned into map objects.
- Level Service → Door Factory: builds doors · Door definitions become model doors.
- Level Service → Item Factory: builds items · Items and triggers are constructed.
- Room Factory → Room: creates · Rooms are materialized in the model.
- Tile Factory → Tiles: creates · Tile hierarchy is assembled.
- Door Factory → Doors: creates · Door hierarchy and decorators are assembled.
- Item Factory → Items: creates · Item and trigger objects are assembled.
- Level Service → Level: assembles · The full level is produced from parsed content.
- Level → Room: contains · A level is composed of rooms.
- Room → Tiles: contains · Rooms contain tiles and floor elements.
- Room → Doors: links · Rooms connect through doors.
- Room → Entities: hosts · Rooms contain entities such as the player.
- Room → Items: contains · Rooms contain items and triggers.
- Entities → Contracts: implements · Entities are governed by shared interfaces.
- Tiles → Contracts: implements · Tile behavior follows shared contracts.
- Doors → Contracts: implements · Door behavior follows shared contracts.
- Items → Contracts: implements · Item and trigger behavior follows shared contracts.
- Level → Console View: rendered by · Game state is presented in the console.
- Level → Mapper: mapped for view · Domain objects are converted to renderable forms.
- Mapper → Representation: produces · Mapper emits lightweight view representations.
- Console View → Representation: renders · Console output is based on renderable representations.
