Commit 9052e6b3 authored by Kameron Kinsey's avatar Kameron Kinsey
Browse files

Merge branch 'master' of gitlab.cs.wallawalla.edu:sturaa/cptr142_group_project

parents 2f39c3f4 b98efe0e
......@@ -6,5 +6,6 @@ using namespace std;
int main(){
Item pocketses;
pocketses.gainItem("Globe of Encoded Concurrency", 0, 2, 42);
pocketses.displayItems();
pocketses.gainItem("Philter of Tranquility", 0, 42, 2);
pocketses.listInventory();
}
\ No newline at end of file
......@@ -21,7 +21,7 @@ void Item::gainItem(string lootName, int lootFight, int lootFlee , int lootTalk)
}
//outputs the inventory array
void Item::displayItems(){
void Item::listInventory(){
for(int i = 0; i < itemName.size(); i++){
cout << itemName.at(i) << ": Fight: " << itemFight.at(i) << " Flee: "<< itemFlee.at(i) << " Talk: " << itemTalk.at(i) << endl;
}
......
//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.
#ifndef ITEM_H
#define ITEM_H
......@@ -48,10 +49,10 @@ class Item{
}
//Outputs your inventory line-by-line.
void displayItems();
void listInventory();
//removes item from inventory. May not implement.
//loseItem(string lootName, int lootFight, int lootFlee, int lootTalk);
};
#endif // BANKACCOUNT_H
\ No newline at end of file
#endif // ITEM_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