How alanmet/zork works
Zrok is a console text-adventure engine. The principal workflow is console input through the game loop and command parser, which dispatches actions to the player and world; the loop then describes the current room. The runtime also supports serialized save/load, restart, and scripted command input. The graph retains the documented vocabulary, inventory, item, and room capabilities. Some room interactions and the trophy-case implementation were not excerpted, so uncertain links are omitted; save/load behavior is visible in the game loop source.
Main entry points: Player.cs Player Actions · GameRunner.cs Game Loop · Adventure Parser.cs Command Parser · Room.cs Rooms and Exits
Components 16
Game Runtime
- Game Loop
zrok/zrok/GameRunner.cs - Adventure State
zrok/zrok/Adventure.cs
Command Parsing
- Command Parser
zrok/zrok/Adventure Parser.cs - Word Types
zrok/zrok/WordAndType.cs
World and Player
- Player Actions
zrok/zrok/Player.cs - Rooms and Exits
zrok/zrok/Room.cs - Trap Door Room
zrok/zrok/TrapDoorRoom.cs - Window Room
zrok/zrok/WindowRoom.cs
Items and Inventory
- Inventory
zrok/zrok/Inventory.cs - Items
zrok/zrok/Item.cs - Containers
zrok/zrok/Container.cs - Lamp
zrok/zrok/Lamp.cs - Trophy Case
zrok/zrok/Trophy case.cs
Other components
- Player
- Console
- Save File
Connections 21
- Player → Console: enters commands
- Game Loop → Console: reads and prints
zrok/zrok/GameRunner.cs - Game Loop → Adventure State: creates and updates
zrok/zrok/GameRunner.cs - Game Loop → Command Parser: forwards commands
zrok/zrok/GameRunner.cs - Game Loop → Save File: serializes state
zrok/zrok/GameRunner.cs - Save File → Game Loop: restores state
zrok/zrok/GameRunner.cs - Adventure State → Player Actions: creates and describes
zrok/zrok/Adventure.cs - Command Parser → Word Types: classifies words
zrok/zrok/Adventure Parser.cs - Command Parser → Player Actions: dispatches actions
zrok/zrok/Adventure Parser.cs - Command Parser → Trap Door Room: checks room type
zrok/zrok/Adventure Parser.cs - Player Actions → Rooms and Exits: moves through
zrok/zrok/Player.cs - Player Actions → Inventory: updates inventory
zrok/zrok/Player.cs - Player Actions → Containers: opens and transfers
zrok/zrok/Player.cs - Player Actions → Lamp: lights and unlights
zrok/zrok/Player.cs - Player Actions → Window Room: handles window room
zrok/zrok/Player.cs - Rooms and Exits → Items: holds items
zrok/zrok/Room.cs - Containers → Items: holds items
zrok/zrok/Container.cs - Inventory → Items: stores items
zrok/zrok/Inventory.cs - Lamp → Items: extends item
zrok/zrok/Lamp.cs - Trap Door Room → Rooms and Exits: extends room
zrok/zrok/TrapDoorRoom.cs - Window Room → Rooms and Exits: extends room
zrok/zrok/WindowRoom.cs