Skip to content

Isaac Schulz#7

Open
SnailDust wants to merge 24 commits into
AQNclasses:mainfrom
SnailDust:main
Open

Isaac Schulz#7
SnailDust wants to merge 24 commits into
AQNclasses:mainfrom
SnailDust:main

Conversation

@SnailDust
Copy link
Copy Markdown

Main Objectives

  1. I added added 8 rooms to the rooms.yaml. I also added a floor property for every room, and this required Room.java and LoadYAML.java to be updated to accept the new property.
  2. I added 3 endings, none of them rely directly on a room, but they all require moving between rooms to get items. One of the added endings required the garage to be unlocked and the car to be interacted with. All the endings were added to GameState.java.
  3. The garage is locked and must be unlocked by using a key in an adjacent room. To get this to work I had to modify LoadYAML.java, Game.java, Room.java, and add it Key.java. My initial implementation would have allowed for one way doors, but since it was an unintended complex feature it was removed.
  4. Almost every item now has it's own subclass. This required a switch statement in LoadYAML.java and also adding all of the additional classes.
    • Most items will interact with game state in some way. On the most basic level some items have the action to be dropped, moving the item from inventory to room. I did not integrate the drop action into the item class, it is still in Game.java.
  5. I added the Potion.java class and three potions. These are powerful potions placed around the world. One potion teleports back to the Starting Room, one potion clears the inventory of everything except itself, and the last potion clears all items. I had a bug with the green potion at one point that resulted in a null item in the inventory causing problems, but I haven't been able to recreate the issue.
  6. I added two new tests. One test will traverse all the rooms to make sure that all the rooms have at least one door to them. The other test will also traverse all rooms, but it checks to make sure that all the doors are connected in both direction, to prevent trapping the player.

Other notes

  • Fixed a bug in Game.java that caused the game to crash when selecting an invalid item from the inventory.
  • Fixed a bug in Game.java that caused the game to crash when entering string instead of a int on the option selection screen.
  • Added a quit option to gracefully exit the game.
  • Added an option to inspect an item in the inventory.
  • Added the name of the room to the read out when "Looking around the room."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant