Skip to content

Jasmine Lofton#6

Open
jasminelofton wants to merge 5 commits into
AQNclasses:mainfrom
jasminelofton:main
Open

Jasmine Lofton#6
jasminelofton wants to merge 5 commits into
AQNclasses:mainfrom
jasminelofton:main

Conversation

@jasminelofton
Copy link
Copy Markdown

@jasminelofton jasminelofton commented Dec 10, 2024

    - For each of the six deliverables in the README, write a sentence or two about whether you successfully implemented that "feature" and which classes you added or modified to do so. If you were unable to complete a feature, write up a short summary of what you tried and what you think the issue is, for some partial credit.

  1. Add at least two new rooms in rooms.yaml, connected to the existing rooms.
    -Yes. I had to modify rooms.yaml, gamestate, and game to add my 6 new rooms.
  2. Add an ending related to at least one of your new rooms. Endings are implemented in GameState.java.
    -Yes. I added an ending and it is located in the game, gamestate, and room.yaml, I used room called light when entered sets off the trigger to end the game. The game is ended when the door is unlocked.
  3. Implement a locked door that can only be opened if a Key is in your inventory. CHECK
  • Yes. I have 2 keys located throughout the rooms, a key subclass, events that happen when you collect keys (inside game class). When you use the 3 keys the locked door will open.
  1. Finish implementing subclasses for Items (Animal, Weapon, etc) instead of reading all CHECK
    items in as Items.
  • Yes. I did this in animal, weapon, and key subclasses. I also needed to modify the items super class. I also changed the items.yaml to sort the different types of items.
  1. Add and implement actions for all the items. All actions should modify GameState. CHECK
  • Yes. I added all the actions for my objects in the items.yaml and used the actions to set off triggers throughout the game.
  1. Add a new subclass of items and at least three corresponding entries in items.yaml. CHECK
  • Yes. I added a plants class which will drop items onto the ground and pick them up, you do not need to use these plants to complete the game but I was told it qualified if the action was drop so I implemented the plant items to have a drop action.
  1. Implement two new tests in Game/src/test/java/GameTest.java. CHECK
  • Yes. I added 2 tests they are in the gametest class.

    - If you do any extra credit features, also write up a short summary of what you did and how your new feature works.
    -Not sure if all these are extra credit, but these are the changes I made. I set up a throws exception in case 2 for if the scanner picks up a word that is not a door of the room, instead of breaking the code it will catch it and not update the room until an acceptable door is put in the scanner. I added a quit program button [0] to end the game immediately by modifying the gamestate to detect if [0] is entered by user. I modified the items.yaml class and moved the damage to above the use so the compiler could use the damage input. I also threw an exception for case 5 if the item inputted from scanner is not an actual item, instead of breaking the compiler (I dont remember if it actually broke the compiler or it just did something wierd) it sends the exception. The last thing I did was create a try and catch for the scanner input when the user types 0-5 for "What do you want to do next" options, instead of the system breaking when a letter was accidently put into the scanner, the system now returns the default message and doesn't break anymore (hence why I had to put the [0] end program option to get out of the program without having the complete the whole game to end program).

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.

2 participants