-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSYS.cpp
More file actions
37 lines (34 loc) · 846 Bytes
/
Copy pathSYS.cpp
File metadata and controls
37 lines (34 loc) · 846 Bytes
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
/**
* @file SYS.cpp
* @author Ben
* @brief Class representing the Shoot Your Shot game.
* @version 0.1
* @date 2018-11-28
*
* @copyright Copyright (c) 2018
*
*/
#include "SYS.h"
using namespace std;
/**
* @brief Construct a new SYS object to initialize all possible drinks that the user could receive, and the amount of said drinks.
*
* @param possibleDrinks Vector representation of a list of all possible drinks and amounts to be chosen from.
*/
SYS::SYS(vector<Drink> possibleDrinks){
badDrink = possibleDrinks[9];
goodDrink = possibleDrinks[10];
}
/**
* @brief Method which randomizes the drink options and pours either a good or bad drink.
*
*/
void SYS::ShootYourShot(){
int drinkchoice = rand() % 6 + 1;
if(drinkchoice == 6){
badDrink.pour();
}
else{
goodDrink.pour();
}
}