Open drossos opened 7 years ago
Ok so made array list of String that represents items (to be Items once we make the class) and also made the Check command that prints out everything that is in the room. Oh also doesn't parse line for multiple objects, only adds whole line after semi-colon to Items
We are going to write what a room contains in the rooms.dat file right?
@Aliqyan yeah another line will be written containing items in the room
@drossos @Aliqyan are we gonna have an array containing all the possible item names for each type of item, or are we gonna have the type already listed?
@ajollymarlier @Aliqyan We could make the the line containing the type of item along with name of item and stats. That way you parse line an create new Item object from that. Just an idea
@drossos That sounds good Btw we can also ad reactions to comments
@drossos @Aliqyan We should also have a boolean stored in each item/room to check if it is picked up or not. So we dont run into duplication glitches
@ajollymarlier That would work, we could also just check against our inventory to check if we can pick it up or not. But i feel like booleans would be more efficient. We could add that to our interface of items
@Aliqyan @ajollymarlier We might be able to just also remove the Item from the in currentRoom and add it to the Inventory. That way we could take items from other rooms and put them in new rooms from your inventory
Made a first version of the room item initializer that uses an arraylist of Strings as a substitute to having an array list of Items. Easy to update once we make the item class. Will run it by you guys in English.
@drossos if you remove an item does that item go back where it originates or does it remain where u drop it?
@Aliqyan it remains in the room you dropped it
@Aliqyan @ajollymarlier could have options to drop or destroy item if we wanted
@drossos cool, also it could be like after a certain amounts of uses the item gets destroyed
@drossos @ajollymarlier I mean for potions not weapons
@Aliqyan @ajollymarlier Different types of items can have different ways of disposing of them
@drossos @Aliqyan @cstrahle I might get started on making a first draft of the hierarchy just to get a baseline.
Pushed first version make sure to pull
Am nearly done a way to remove items from a room. Since there is no inventory yet though it just gets rid of the "Item" entirely from the room.
@drossos @Aliqyan @cstrahle Im working on an item class hierarchy right now. Just click the link and let it access your github. Then look in the data folder for something called ZORK
Link: www.draw.io
@drossos @Aliqyan the item hierarchy is up in the data file as a png
@ajollymarlier we might want to have a key Item in there as well
@drossos it could be a consumable. I haven't planned out the individual classes for each parent class. ie sword for melee or key for consumable
@drossos i added a method in the player class that adds an item in the inventory arraylist. You can use it now for removing items in the room.
@Aliqyan @ajollymarlier @drossos Have you considered using HashMaps?
Writing a way to have items in room. Also writing way to check what items are in the room