A terminal-based hostage negotiation game powered by AI dialogue and four core data structures.
pip install -r requirements.txt
set ANTHROPIC_API_KEY=sk-ant-... # Windows
# export ANTHROPIC_API_KEY=sk-ant-... # macOS/Linux
python main.py| Structure | File | Role in Game |
|---|---|---|
| Binary Tree | dsa_structures/binary_tree.py |
Scene decision branching |
| Stack (LIFO) | dsa_structures/stack.py |
Journey history & undo |
| Singly Linked List | dsa_structures/linked_list.py |
Hostage priority chain |
| Directed Graph | dsa_structures/directed_graph.py |
Full story map & pathfinding |
main.py ← Entry point (splash + briefing)
requirements.txt
dsa_structures/
binary_tree.py ← StoryNode, StoryBinaryTree
stack.py ← DecisionRecord, DecisionStack
linked_list.py ← Hostage, HostageChain
directed_graph.py ← Edge, StoryGraph
engine/
story_data.py ← Builds all 4 DSA structures with story data
dialogue_ai.py ← GhostDialogue (Claude claude-sonnet-4-6)
game_engine.py ← Main game loop
| Key | Action |
|---|---|
1 / 2 |
Make a choice |
B |
Undo last decision |
H |
View hostage list |
S |
View decision stack |
M |
View scene map |
Q |
Quit |
Note: Files inside
engine/(story_data.py, dialogue_ai.py, game_engine.py) are outside the DSA syllabus scope and serve as glue code only. All assessable DSA logic lives exclusively indsa_structures/.