How limiajayi/java-space-game works
Informative Space Game is a command-line exploration game: the player navigates a planetary map, enters locations, gathers materials and learns space facts, then returns for an outcome and score. The main interaction loop and planet-specific behavior are implemented together in Game.java; supporting classes hold player state, map and room data, inventory, and scoring. The excerpts show these relationships, but do not expose the full command loop, so the graph does not infer finer-grained control flow within it.
Main entry points: Game.java Game loop · Player.java Player state · Map.java Space map · Position.java Coordinates
Components 9
Game interaction
- Game loop
Game.java - Planet exploration
Game.java
World model
- Space map
Map.java - Planet rooms
Room.java - Coordinates
Position.java
Player state
- Player state
Player.java - Inventory
Inventory.java - Score
Score.java
Other components
- Player
Connections 14
- Player → Game loop: enters commands
README.md - Game loop → Planet exploration: dispatches actions
Game.java - Game loop → Space map: creates and displays
Game.java - Game loop → Planet rooms: creates and describes
Game.java - Game loop → Player state: moves player
Game.java - Game loop → Inventory: updates items
Game.java - Game loop → Score: updates score
Game.java - Planet exploration → Inventory: collects materials
Game.java - Planet exploration → Score: solves puzzles
Game.java - Player state → Space map: moves on
Player.java - Player state → Inventory: holds items
Player.java - Player state → Coordinates: stores position
Player.java - Space map → Coordinates: places rooms at
Map.java - Planet rooms → Coordinates: stores location
Room.java