The Lost Shrine - A text-adventure CLI game starter implementation.
This is a starter implementation with basic game mechanics:
look- Display the current room (title, description, items, exits)help- List available commandsgo <direction>- Move between rooms (north, east, south, west)quit- Exit the game
- Cottage (starting room) - Contains map, exits north to Forest
- Forest - Contains rope, exits south to Cottage
- Add remaining rooms (Clearing, Riverbank, Hill, Bridge, Stone Gate, Dark Cave, etc.)
- Implement
takeanddropcommands for item management - Implement
inventorycommand - Implement
examinecommand for item descriptions - Implement
usecommand for context-specific actions (rope, pickaxe, lantern) - Implement
light lanterncommand - Add game mechanics: bridge blocking, darkness hazard, quicksand soft reset
- Add victory condition (taking the artifact)
- Go toolchain (
go versionshows installed). Current development version: 1.22+ - (Optional)
golangci-lintfor linting: install viago install github.com/golangci/golangci-lint/cmd/golangci-lint@latest.
Run the game:
go run ./cmd/appOr build and run:
make runRun tests:
make testCottage
A cozy wooden cottage. There's a table with a dusty old map.
You see: map
Exits: north
> help
Available commands:
look - Re-print the current room
help - List supported commands
go <direction> - Move in a direction (north, east, south, west)
quit - Exit the game
> go north
Forest
Tall trees surround you. A rope dangles from a branch.
You see: rope
Exits: south
> go south
Cottage
A cozy wooden cottage. There's a table with a dusty old map.
You see: map
Exits: north
> quit