A text-based adventure game with a Java Swing GUI, built as part of a Software Engineering course at HAW Hamburg. The player takes on the role of a pizza delivery boy — navigating through rooms and streets to find the correct destination and deliver the pizza before time runs out.
Based on the Objects First with Java (Barnes & Kölling) adventure game framework, extended with a custom GUI, player model, inventory system, and game history.
- Navigate a map of interconnected rooms (kitchen, street blocks A–E, streets)
- Pick up the pizza and find the correct delivery destination
- Use directional buttons in the GUI to move between rooms
- Each room displays a description and image
- Game ends when the pizza is successfully delivered — or you get lost
PizzaDeliveryGame/
│
├── Game.java # Core game logic & room initialization
├── Environement.java # Map layout — rooms and connections
├── Room.java # Room entity with exits and image
├── Player.java # Player state — location, inventory
├── Item.java # Item model (pizza)
├── Parser.java # Command input parser
├── Command.java # Command model
├── CommandWords.java # Valid command definitions
├── Playable.java # Game interface
├── UI.java # UI controller
├── GUI.java # Swing GUI — buttons, panels, room images
├── GameHistory.java # Session history tracking
└── robin.txt # Dev notes
| Class | Responsibility |
|---|---|
Game |
Orchestrates game state, room transitions, win condition |
Environement |
Builds and connects the room graph |
Room |
Node in the room graph — exits, description, image path |
Player |
Tracks current location and inventory |
GUI |
Swing interface — displays room info, navigation buttons |
Parser |
Parses text commands from UI input |
GameHistory |
Records visited rooms and actions |
Prerequisites: Java 8+, BlueJ or any Java IDE
- Open the project folder in BlueJ
- Right-click
Game→new Game("YourName") - Call the
play()method on the created instance
javac *.java
java Game| Component | Technology |
|---|---|
| Language | Java |
| GUI | Java Swing |
| IDE | BlueJ |
| Paradigm | Object-Oriented Programming |