Commit cc671794 authored by Milwaukee Davis's avatar Milwaukee Davis
Browse files

Upload Inventory class header

parent 7f7ad8a5
//filename: item.h
//Contains the implementation of the more complicated functions from the item class, which represents the items the player is carrying in the form of several dynamic arrays.
//Item accepts new items from the Monster class upon the player 'beating' the room, and allows the player to change which item they have equipped through the Player class.
#include <iostream> //for output
#include <vector>
#include <string>
#include "Item.h"
using namespace std;
class Inventory{
vector<Item> inventory;
int equipped; // holds the index of the item currently equipped
//Constructs a new Item class.
//Accepts a string and three ints from the Monster class, and adds it into the 'array' of inventory.
void gainItem(string lootName, int lootFight, int lootTalk){
Item newItem(lootName, lootFight, lootTalk);
//returns the fight attribute of the equipped item
int getEquippedFight(){
//returns the talk attribute of the equipped item
int getEquippedTalk(){
//sets the equipped item to the index given by the player.
void setEquipped(int selection){
equipped = selection;
//Outputs your inventory line-by-line.
void listInventory();
#endif // INVENTORY_H
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment