Open
Conversation
I was thinking about Item.java on my way back. I thought about A8, we can overload the constructors to accept different parameters. And this way, we can write all the items in this(maybe not computer because it's more complicated). We can let : Item teddyBear = new Item(...)
Room Class
Notes: 1.I deleted several items to start small and make it easier. We can always add more later. 2. I added the two souls as instances of items. We can try setting the two souls as items instead of writing a soul class. 3.I think printManifest of all the items should be in room classes instead of Item class. We could store the available items in an arrayList and print out. 4. I'm unsure of whether this will work. Should we start a main class and put this main method in?
I also deleted computer as an item. We will write a separate class for it because of its complexity.
I kept the description for each room in the command and I added attributes of a name and an arraylist of items. A wild idea: Can we write bedroom and lab as instances of room instead of starting a subclass. But if so, how do we deal with the computer?
I think it's a better idea to let bedroom and lab be instances of the room instead of subclasses
This is the class where we implement the classes and methods we have written and run the game. I currently created the items and two rooms. Much more to be added later, but this is a good start!
We can take advantage of this attribute later. If laserActive == true && (the user chooses to walk), the player will die, achieving the first ending.
… Robot classes differently
Wrote basic code for the majority of methods/accessors in Existence; Overrode fight() in Human and Robot Class
…loaded selfDestruct methods for better functionality
1. I updated the descriptions for the items and added the `door` item that connects the bedroom and the lab; 2. I Implemented`health`, `inventory`, `look`, `touch` and `inspect` in game loop 3. Still need to put the other commands inside game loop, as well as tasks, stages and endings 4. I closed scanner outside of the game loop so that it runs normally. 5. I've tested running the game loop and it looks decent. Still many things to be added, but at least we have something to run now!!! We are almost there!
changed if's to switch-case
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.