-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCookware.cpp
53 lines (42 loc) · 1.03 KB
/
Cookware.cpp
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
//Authors Nicolas Post and Ryan Greir
#include <iostream>
#include <iostream>
#include "Cookware.h"
using namespace std;
Cookware::Cookware()
{
name_ = "";
cost_ = 0;
chance_of_breaking_ = 0;
}
Cookware::Cookware(string name, int cost, double chance_of_breaking)
{
name_ = name;
cost_ = cost;
chance_of_breaking_ = chance_of_breaking;
}
string Cookware::getName()
{
return name_;
}
void Cookware::setName(string name)
{
name = name_;
}
int Cookware::getCost()
{
return cost_;
}
void Cookware::setCost(int cost)
{
cost = cost_;
}
double Cookware::getBreakChance()
{
//This function will be used when the player decides to cook something
//It will take into account what type of cookware it is
//Next it will use a random number generator based off the chance percentage
//If the cookware does break it will ouput a message and remove the cookware
//If it doesn't break then it will just continue working until the next tim ethe function is called
return chance_of_breaking_;
}