Skip to content

Bryce Clark#9

Open
Bryce285 wants to merge 20 commits into
AQNclasses:mainfrom
Bryce285:main
Open

Bryce Clark#9
Bryce285 wants to merge 20 commits into
AQNclasses:mainfrom
Bryce285:main

Conversation

@Bryce285
Copy link
Copy Markdown

  1. Adding new rooms: To implement this feature, I added a kitchen, a treasure room, and three dungeon rooms in rooms.yaml. I also had to edit Game.java and GameState.java to allow the player to move to these new rooms.
  2. Adding a new ending: I chose to add an ending to the treasure room. To do this I had to edit GameState.java so that the game is marked as finished when the player gets there.
  3. Adding a locked door/key: I made it so that the player needs a key to open the door to the treasure room. To do this I added a key item to items.yaml, and then I had to edit Game.java so that the player has to use the key to open the treasure room door.
  4. Finish implementing subclasses: To do this I created the new Key, Food, and Armor subclasses in Key.java, Food.java, and Armor.java. I also added actions to all the items in items.yaml (the slime item doesn't have an action that modifies the gamestate since it is meant to function as more of an enemy than as a regular item). I then edited LoadYAML.java so that it reads in all the different items as the correct subclass. I couldn't get the Animals subclass to work though, possibly because having the poison frog as two different types is messing up the logic.
  5. Add a new subclass: The Food subclass is new, and contains the berries, beef, and bread items. To implement this I added the new items to items.yaml and then created Food.java, which extends Item.java. I also added to Game.java to allow the player to interact with these new items.
  6. Implement new tests: The two new tests that I added are testItemSubclasses, and testRoomContents. testItemSubclasses creates a new bread item and then checks that it is of type Food. testRoomContents loads the kitchen room and then verifies that it has the correct items in it.

Bryce285 and others added 20 commits December 10, 2024 17:13
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
accidently uploaded to the wrong place
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