forked from mastifikator/FantasyJavaPatterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnit.java
More file actions
64 lines (53 loc) · 1.42 KB
/
Unit.java
File metadata and controls
64 lines (53 loc) · 1.42 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
60
61
62
63
64
package Builder;
public class Unit {
private String race;
private String proffesion;
private String weapon;
private double strength;
private double speed;
private double damage;
private String name;
public Unit(String race, String proffesion, String weapon, double strength, double speed, double damage, String name) {
this.race = race;
this.proffesion = proffesion;
this.weapon = weapon;
this.strength = strength;
this.speed = speed;
this.damage = damage;
this.name = name;
System.out.println(this.toString());
}
public String getRace() {
return race;
}
public String getProffesion() {
return proffesion;
}
public String getWeapon() {
return weapon;
}
public Double getStrength() {
return strength;
}
public Double getSpeed() {
return speed;
}
public Double getDamage() {
return damage;
}
public String getName() {
return name;
}
@Override
public String toString() {
return "Unit{" +
"race='" + race + '\'' +
", proffesion='" + proffesion + '\'' +
", weapon='" + weapon + '\'' +
", strength=" + strength +
", speed=" + speed +
", damage=" + damage +
", name='" + name + '\'' +
'}';
}
}