forked from mastifikator/FantasyJavaPatterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrcLeader.java
More file actions
43 lines (34 loc) · 938 Bytes
/
Copy pathOrcLeader.java
File metadata and controls
43 lines (34 loc) · 938 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 Visitor;
public class OrcLeader {
private String name;
private boolean isNoble;
private double money = 2000;
public OrcLeader(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean isNoble() {
return isNoble;
}
public void setNoble(boolean noble) {
isNoble = noble;
}
public double getMoney() {
return money;
}
public void setMoney(double money) {
this.money = money;
}
public void warWithHuman(){
if(money < 3000){
System.out.println("Надо пойти добыть денег с мягкотелых людишек!");
}else {
System.out.println("Надо построить корабли и отправляться в Дуротар!");
}
}
}