forked from mastifikator/FantasyJavaPatterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnitBuilder.java
More file actions
43 lines (34 loc) · 919 Bytes
/
UnitBuilder.java
File metadata and controls
43 lines (34 loc) · 919 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
38
39
40
41
42
43
package Builder;
public class UnitBuilder {
private String race;
private String proffesion;
private String weapon;
private double strength;
private double speed;
private double damage;
private String name;
public void setRace(String race) {
this.race = race;
}
public void setProffesion(String proffesion) {
this.proffesion = proffesion;
}
public void setWeapon(String weapon) {
this.weapon = weapon;
}
public void setStrength(double strength) {
this.strength = strength;
}
public void setSpeed(double speed) {
this.speed = speed;
}
public void setDamage(double damage) {
this.damage = damage;
}
public void setName(String name) {
this.name = name;
}
public Unit getResult(){
return new Unit(race, proffesion, weapon, strength, speed, damage, name);
}
}