-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathColaMachine.h
63 lines (52 loc) · 1.16 KB
/
ColaMachine.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#pragma once
#include <list>
#include <iostream>
#include <string>
#include <random>
#include "Bank.h"
using namespace std;
class ColaMachine
{
public:
//Add money to _money
void addMoney(int money);
ColaMachine();
//Print Vending machine function
void printMachine();
//Main game loop
bool gameLoop();
//Ask the user what drink they want
void chooseDrink();
//generate money
void moneyMaker();
//Vending machine with a cool //OUT OF STOCK// text
void outOfStock(bool test);
//Print user inventory
void printInv();
//Print the amount of money user has!
void printMoney() { cout << "Your money: " << '$' << _money << '\n' << endl; }
//Add to inventory
void addInv(int drink);
//Initialize the machine
void init(int cola, int water, int sprite, int fanta, int beer);
//Check if game has ended
bool checkEnd();
//Destructor
~ColaMachine();
protected:
int _money;
private:
//Private values for machine
bool _end;
int _cola;
int _water;
int _sprite;
int _fanta;
int _beer;
//Private player values. _p in front
int _pcola;
int _pwater;
int _psprite;
int _pfanta;
int _pbeer;
};