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?
Text-based-Game/inventory.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
25 lines (19 sloc)
592 Bytes
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
#ifndef INVENTORY_H_INCLUDED | |
#define INVENTORY_H_INCLUDED | |
#include <iostream> | |
#include <string.h> | |
using namespace std; | |
class Inventory | |
{ | |
public: | |
int weapon; | |
int food; | |
int potion; | |
int sum=0; | |
int maxsum=10; | |
Inventory(); | |
void addItem( char item[10], int & quantity, int & weapon, int & food, int & potion, int & sum, int & maxsum ); | |
void getItem(char item[10], int & weapon, int & food, int & sum, int & potion, int & quantity); | |
void display(int & weapon, int & food, int & potion, int & sum); | |
}; | |
#endif // INVENTORY_H_INCLUDED |