Started Creating the Game and it's Classes
This commit is contained in:
parent
824b45d924
commit
658ca6ae5c
|
|
@ -0,0 +1,79 @@
|
||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
#define MAX_TURNS 30
|
||||||
|
enum Objects{
|
||||||
|
Acid,
|
||||||
|
Weed,
|
||||||
|
Speed,
|
||||||
|
Cocaine,
|
||||||
|
Ludes
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
class Bags{
|
||||||
|
public:
|
||||||
|
|
||||||
|
int max_Number_Items;
|
||||||
|
std::vector<Objects> items;
|
||||||
|
std::map<std::string, std::vector<int>> indexesMap;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void setCapacity(int size){
|
||||||
|
this->max_Number_Items = size;
|
||||||
|
|
||||||
|
};
|
||||||
|
void addItem(Objects item){
|
||||||
|
items.push_back(item);
|
||||||
|
|
||||||
|
}
|
||||||
|
void addMultipleItems(Objects item, int n){
|
||||||
|
for (int i = 0; i<= n;i++){
|
||||||
|
items.push_back(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class Basic_Trenchcoat: public Bags{
|
||||||
|
public:
|
||||||
|
Basic_Trenchcoat(): Bags(){
|
||||||
|
this->setCapacity(100);
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class Player{
|
||||||
|
private:
|
||||||
|
int Money = 0;
|
||||||
|
Bags *inventory = new Basic_Trenchcoat;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class Game{
|
||||||
|
private:
|
||||||
|
Player *player = new Player();
|
||||||
|
int current_Turn = 0;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
void Run(){
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
Game *main = new Game;
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue