RPGItem - JayhawkZombie/EECS581Project GitHub Wiki
Abstract
Item is the base class for all of the items. Its member variables include m_name m_discription and m_value, there should be no instances of Item created except for testing purposes. In the implementation, Item was renamed RPGItem because Visual Studio threw a fit
Derived From
None
Member Variables
- m_name: The name of the item
- m_description: The description of the item
- m_value: The value of the item
- m_id: The index of this item in the inventory array
Methods
- get/set for all variables
- virtual static int Num() returns the total number of items for use in defining the size of the inventory for the party
- Note that this is the total for ALL items so basically Num() is going to call the Num() of all derived classes and add them together
- static Item[] get() returns an array containing all of the items
Old Version
- The Old Java MonsterMaster is very similar to the end goal for the final project.
- The [GenericRPGConsole] version shows how the derived constructor should work - taking in an int and returning an Item, however ours should be much more general, just a for loop because that information will be stored in file and of course, this information just corresponds to the derived classes
Future Plans
This class is supposed to be pretty basic but there will be a lot of future plans for the derived classes!