How vedantgawande/text-based-rpg works
This Java Swing RPG lets a player explore a branching house, interact with room items, recover health, and fight monsters. The main GUI starts a game using GameVersionFinal, presents room and combat actions, and delegates combat moves to MonsterRoom; the game logic also supports command-based interaction. The graph covers documented navigation, inventory, healing, and combat capabilities. Some setup and GUI behavior is unsampled, so edges are limited to excerpted calls or README statements.
Main entry points: CustomPlayer.java Health-capable player · Room.java Room navigation · GameGUI.java Game GUI · MonsterRoom.java Monster room
Components 19
Player interface
- Game GUI
Text-Based-RPG/GameGUI.java - Game window
Text-Based-RPG/GameWindow.java - Command input
Text-Based-RPG/GameInput.java
World exploration
- Game setup
Text-Based-RPG/GameVersionFinal.java - Room navigation
Text-Based-RPG/Room.java - Standard room
Text-Based-RPG/StandardRoom.java - Sleep room
Text-Based-RPG/SleepRoom.java - Monster room
Text-Based-RPG/MonsterRoom.java
Player state
- Player and inventory
Text-Based-RPG/Player.java - Health-capable player
Text-Based-RPG/CustomPlayer.java - Health item catalog
Text-Based-RPG/HealthItemCatalog.java - Health item definitions
Text-Based-RPG/HealthItem.java - Consumable contract
Text-Based-RPG/Consumable.java - Item utilities
Text-Based-RPG/Utilities.java
Combat
- Battle rules
Text-Based-RPG/MonsterBattle.java - Player attacks
Text-Based-RPG/PlayerAttackSet.java - Attack definition
Text-Based-RPG/Attack.java - Attack effects
Text-Based-RPG/AttackEffect.java
Other components
- Player
Connections 20
- Player → Game GUI: uses controls
README.md - Game GUI → Game setup: starts game
Text-Based-RPG/GameGUI.java - Game GUI → Monster room: submits attacks
Text-Based-RPG/GameGUI.java - Player → Game window: enters commands
README.md - Game setup → Room navigation: creates rooms
README.md - Room navigation → Player and inventory: updates inventory
Text-Based-RPG/Room.java - Room navigation → Item utilities: manages items
Text-Based-RPG/Room.java - Health-capable player → Player and inventory: extends player
Text-Based-RPG/CustomPlayer.java - Health-capable player → Health item catalog: looks up items
Text-Based-RPG/CustomPlayer.java - Health item catalog → Health item definitions: registers definitions
Text-Based-RPG/HealthItemCatalog.java - Health item definitions → Consumable contract: implements contract
Text-Based-RPG/HealthItem.java - Monster room → Battle rules: delegates combat
Text-Based-RPG/MonsterRoom.java - Battle rules → Item utilities: checks inventory
Text-Based-RPG/MonsterBattle.java - Battle rules → Health-capable player: applies damage
Text-Based-RPG/MonsterBattle.java - Health-capable player → Player attacks: owns attacks
Text-Based-RPG/CustomPlayer.java - Player attacks → Attack definition: provides moves
Text-Based-RPG/PlayerAttackSet.java - Attack definition → Attack effects: specifies effect
Text-Based-RPG/Attack.java - Sleep room → Health-capable player: heals player
README.md - Standard room → Room navigation: specializes room
README.md - Monster room → Room navigation: specializes room
Text-Based-RPG/MonsterRoom.java