ucsb-cs56-projects / cs56-games-simple-rpg

-
1 stars 6 forks source link

fixes issues #11 and #9 #17

Closed ghost closed 7 years ago

ghost commented 8 years ago

Issue #11: The GameMaps class sets the framework for different types of maps to be created. But since the game's current map cannot be changed (currently), the only way to see this is to manually change which GameMaps constructor is used in the Games class.

Issue #9: Additional functionality was added to the shop by making a ShopDisplay constructor that takes a MainCharacter as an input. When purchasing an item, whether or not the item is still in the shop is taken into consideration, and the MainCharacter is able to put purchased Weapons into their inventory if they have the proper amount of gold (although, since gold can't currently be acquired in the game, this feature is currently unreachable). The amount of gold the MainCharacter has is then subsequently decreased.

extrabutter commented 8 years ago

Other updates to the repo:

  1. Fixes issue #18: A new abstract class Item has been created as a superclass to both Weapon and the brand new Potion class. Item acts as the overarching abstract type for all types (present and future) implemented in the SimpleRPG game. Weapon and Potion inherit the generic behaviors of the Item class (code, name, price) while implementing additional unique instance variables within each of their respective classes. EDIT: Added Spell class, another concrete implementation of the abstract Item class it extends.
  2. The Inventory class has been created for use within the MainCharacter class (to replace the existing ArrayList that stores Weapon objects with an Inventory object that can store Item objects). EDIT: The MainCharacter class has been updated to include an Inventory object instead of the weapon array. EDIT2: An inventory object now exists within the Shop class to allow the shop to display any object of type Item. Updates to the MainCharacter, Shop, ShopDisplay have been made.
  3. Other tweaks include adding comments to improve code readability as well as the creation of the StartDisplay (WIP) and the GoblinFigure (WIP) class for future planned improvements to the GUI.

Update highlights: -- Weapon, Potion, and Spell classes have been reworked/restructured with the addition of the Item class. -- Inventory class added and implemented in Shop and MainCharacter. -- Various small tweaks to comments and layout. Updated the README to reflect the current status of the GUI version. -- 'Scaffolding' created for future class implementations (StartDisplay) -- Shop is now semi-functional. Items disappear from menu when purchased -- Goblin figure has been implemented exactly like MainCharacterFigure for the purpose of testing displaying and movement of the Goblin character within the game. (GoblinFIgure will be updated in future).