How z-manw/rocks works
Rocks is a terminal pet-rock game: the user chooses actions, the main loop invokes the rock’s behavior, and the rock returns messages and descriptions. The rock tracks mood, temperament, bonding, neglect, and hibernation. The README also describes weather- and mood-based color changes, but the sampled code does not show how weather or visuals are wired; those links are therefore unverified. Several listed modules were empty or unsampled.
Main entry points: main.py Game loop · rock.py Pet rock state · visuals.py Color visuals · mood.py Mood behavior
Components 10
Terminal interaction
- Game loop
pet_rock/main.py - Terminal interface
pet_rock/ui/terminal.py
Rock behavior
- Pet rock state
pet_rock/core/rock.py - Mood behavior
pet_rock/core/mood.py - Temperament behavior
pet_rock/core/temperament.py - Time tracking
pet_rock/core/time.py - Randomness
pet_rock/systems/randomness.py
Ambient presentation
- Weather effects
pet_rock/systems/weather.py - Color visuals
pet_rock/ui/visuals.py
Other components
- Player
Connections 6
- Player → Game loop: chooses actions
pet_rock/main.py - Game loop → Pet rock state: calls actions
pet_rock/main.py - Pet rock state → Game loop: returns messages
pet_rock/main.py - Game loop → Terminal interface: uses terminal
- Mood behavior → Color visuals: influences color
README.md - Weather effects → Color visuals: influences color
README.md