-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtool.cpp
More file actions
59 lines (49 loc) · 1.87 KB
/
Copy pathtool.cpp
File metadata and controls
59 lines (49 loc) · 1.87 KB
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
/*********************************************************************
* Author: Noah Buchen, Alexandra Henley, Elliott Lapinel, Patrick
* Rice, and Samantha Tone
* Date: 10/25/2017
* Description: Implementation file for Tool class
*********************************************************************/
#include "tool.hpp"
/*********************************************************************
* Default constructor for the Tool class
*********************************************************************/
Tool::Tool() {
//set default strength
this->strength = 1;
this->type = 't';
}
/*********************************************************************
* Constructor for the Tool class, takes the users input to set the
* strength
* @param userInput is the users chosen strength
*********************************************************************/
Tool::Tool(int userInput) {
//user sets strength
this->setStrength(userInput);
}
/*********************************************************************
* Sets strength
* @param userInput is the strength
*********************************************************************/
void Tool::setStrength(int userInput) {
strength = userInput;
}
/*********************************************************************
* Should not be called
*********************************************************************/
char Tool::fight(Tool *) {
return 0;
}
/*********************************************************************
* Returns strength
*********************************************************************/
int Tool::getStrength() {
return strength;
}
/*********************************************************************
* Returns type
*********************************************************************/
char Tool::getType() {
return type;
}