Skip to content

Emilia Galant#8

Open
galantem wants to merge 9 commits into
AQNclasses:mainfrom
galantem:main
Open

Emilia Galant#8
galantem wants to merge 9 commits into
AQNclasses:mainfrom
galantem:main

Conversation

@galantem
Copy link
Copy Markdown

  1. The two new rooms I added were the Bedroom and the Mystery Room. This was done in the rooms.yaml and Room.java to add room attributes.
  2. One of the new endings I implemented is related to the Mystery Room where you have to defeat the Goblin or a second enemy to win the game. Also, cleaning all of the rooms, including the new ones, is another way to win the game. Most of the logic is in Game.java and GameState.java.
  3. Both the Bedroom and the Mystery Room are locked. You have to clean the Entry Way in order to discover the key to the Bedroom. The Bedroom has the key to the Mystery Room. I modified rooms.yaml, items.yaml, Game.java, and GameState.java for these features. I also added a Key.java class, which is a subclass of Item.java.
  4. I implemented the following Item subclasses: Animal.java, Weapon.java, CleaningItem.java, PrintMaterial.java, and Key.java.
  5. The new subclasses I added were CleaningItem.java and PrintMaterial.java. The cleaning items are used in Game.java and GameState.java as a way to win the game. The poster gives you a hint to one of the other endings, and the book can be used to win the game as well.
  6. I added two new tests. I tested loading items from the yaml file, specifically the gold key. I also test the use function of the gold Key.
  7. For extra credit, I created two enemies you can defeat to win the game, a troll and a goblin. You as a player have a specific amount of health, and when you strike an enemy, they can strike you back if they are not defeated, decreasing your health. If the enemies decrease your health to 0, you lose the game. If you use the bucket, it adds one to your health if the enemy can fight back.
    I also fixed a couple of bugs. One of them was printing an extra period when you pick up an item. The fix was to remove a period from one of the print statements in Game.java where you pick up an item. The second was a bug where you could pick up an item that wasn’t in the room. For example, when I was playing the game, I noticed that I could pick up a book that was not part of the contents of any room. To fix this, I created a check in Game.java in the user choice switch statement, case 3 where it checks to see if the item is in the room before adding it to your inventory. See my bug fix commits.

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