ajollymarlier / Zork

THE BEST GOTDAMN GAME YOU DUN EVER PLAYED
3 stars 2 forks source link

Items in room #5

Open drossos opened 7 years ago

drossos commented 7 years ago

Writing a way to have items in room. Also writing way to check what items are in the room

drossos commented 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

Aliqyan commented 7 years ago

We are going to write what a room contains in the rooms.dat file right?

drossos commented 7 years ago

@Aliqyan yeah another line will be written containing items in the room

ajollymarlier commented 7 years ago

@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?

drossos commented 7 years ago

@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

Aliqyan commented 7 years ago

@drossos That sounds good Btw we can also ad reactions to comments

ajollymarlier commented 7 years ago

@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

Aliqyan commented 7 years ago

@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

drossos commented 7 years ago

@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

drossos commented 7 years ago

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.

Aliqyan commented 7 years ago

@drossos if you remove an item does that item go back where it originates or does it remain where u drop it?

ajollymarlier commented 7 years ago

@Aliqyan it remains in the room you dropped it

drossos commented 7 years ago

@Aliqyan @ajollymarlier could have options to drop or destroy item if we wanted

Aliqyan commented 7 years ago

@drossos cool, also it could be like after a certain amounts of uses the item gets destroyed

Aliqyan commented 7 years ago

@drossos @ajollymarlier I mean for potions not weapons

drossos commented 7 years ago

@Aliqyan @ajollymarlier Different types of items can have different ways of disposing of them

ajollymarlier commented 7 years ago

@drossos @Aliqyan @cstrahle I might get started on making a first draft of the hierarchy just to get a baseline.

drossos commented 7 years ago

Pushed first version make sure to pull

drossos commented 7 years ago

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.

ajollymarlier commented 7 years ago

@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

ajollymarlier commented 7 years ago

@drossos @Aliqyan the item hierarchy is up in the data file as a png

drossos commented 7 years ago

@ajollymarlier we might want to have a key Item in there as well

ajollymarlier commented 7 years ago

@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

ajollymarlier commented 7 years ago

@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.

wesley-a-leung commented 6 years ago

@Aliqyan @ajollymarlier @drossos Have you considered using HashMaps?