forked from jomokojomoko/ICS-PROJECT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStats.java
109 lines (91 loc) · 2.84 KB
/
Stats.java
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
public class Stats {
// Object which stores all of the individual stats of a player
private int linguisticIntelligence;
private int spatialIntelligence;
private int logicalIntelligence;
private int expressionCharisma;
private int socialCharisma;
private int luck;
private int happiness;
private int strength;
//constructor
public Stats (int linInt, int spatInt, int logInt, int expChar, int socChar, int luck, int happy, int str) {
linguisticIntelligence = linInt;
spatialIntelligence = spatInt;
logicalIntelligence = logInt;
expressionCharisma = expChar;
socialCharisma = socChar;
this.luck = luck;
happiness = happy;
strength = str;
}
//accessors and mutators
public int getTotalIntelligence() {
return this.getSpatialIntelligence() + this.getLogicalIntelligence() + this.getLinguisticIntelligence();
}
public int getSpatialIntelligence() {
return spatialIntelligence;
}
public void setSpatialIntelligence (int spatInt) {
spatialIntelligence = spatInt;
}
public int getLogicalIntelligence () {
return logicalIntelligence;
}
public void setLogicalIntelligence (int logInt) {
logicalIntelligence = logInt;
}
public int getLinguisticIntelligence() {
return linguisticIntelligence;
}
public void setLinguisticIntelligence(int linInt) {
linguisticIntelligence = linInt;
}
public int getTotalCharisma () {
return this.getExpressionCharisma() + this.getSocialCharisma();
}
public int getExpressionCharisma () {
return expressionCharisma;
}
public void setExpressionCharisma(int expChar) {
expressionCharisma = expChar;
}
public int getSocialCharisma () {
return socialCharisma;
}
public void setSocialCharisma (int socChar) {
socialCharisma = socChar;
}
public int getLuck () {
return luck;
}
public void setLuck (int luck) {
this.luck = luck;
}
public int getHappiness () {
return happiness;
}
public void setHappiness (int happy) {
happiness = happy;
if (happiness > 10)
{
happiness = 10;
}
}
public int getStrength () {
return strength;
}
public void setStrength (int str) {
strength = str;
}
//output string
public String toString(){
String str = "Stats:";
str+= "\nTotal Intelligence: " + this.getTotalIntelligence();
str+= "\nLinguisticIntelligence: " + this.getLinguisticIntelligence();
str+= "\nSpatial Intelligence: " + this.getSpatialIntelligence() + "\nLogical Intelligence: " + this.getLogicalIntelligence();
str+= "\nTotal Charisma: " + this.getTotalCharisma() + "\nExpression Charisma: " + this.getExpressionCharisma() + "\nSocial Charisma: " + this.getSocialCharisma();
str+= "\nLuck: " + this.getLuck() + "\nHappiness: " + this.getHappiness() + "\nStrength: " + this.getStrength();
return str;
}
}