Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
SpaceAdventureRPG/Item.cpp
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
61 lines (47 sloc)
1.16 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Item.h" | |
/* implementation of class Merchant constructor */ | |
Item::Item(int id) { | |
this->itemID = id; | |
this->itemType = "Item"; | |
} | |
/* implementation of setter methods of Item class*/ | |
Item::Item() { | |
this->itemType = "Item"; | |
} | |
void Item::setItemID(int id) { | |
this->itemID = id; | |
} | |
void Item::setItemName(string itemName) { | |
this->itemName = itemName; | |
} | |
void Item::setItemValue(int itemValue) { | |
this->itemValue = itemValue; | |
} | |
void Item::setItemInventorySize(int itemSize) { | |
this->itemInventorySize = itemSize; | |
} | |
void Item::setItemType(string itemType) { | |
this->itemType = itemType; | |
} | |
void Item::setIsStackable(bool isStackable) { | |
this->isStackable = isStackable; | |
} | |
/* implementation of getter methods of Item class*/ | |
int Item::getItemID() { | |
return this->itemID; | |
} | |
string Item::getItemName() { | |
return this->itemName; | |
} | |
int Item::getItemValue() { | |
return this->itemValue; | |
} | |
int Item::getItemInventorySize() { | |
return this->itemInventorySize; | |
} | |
bool Item::getIsStackable() { | |
return this->isStackable; | |
} | |
string Item::getItemType() { | |
return this->itemType; | |
} |