Update Player.java
This commit is contained in:
@@ -11,13 +11,21 @@ public class Player {
|
|||||||
private int guns = 3;
|
private int guns = 3;
|
||||||
private int HP = 100;
|
private int HP = 100;
|
||||||
|
|
||||||
public int getDebt() {
|
public Player(){
|
||||||
return debt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDebt(int debt) {
|
}
|
||||||
this.debt = debt;
|
|
||||||
}
|
public Player(Player player){
|
||||||
|
this.bank = player.bank;
|
||||||
|
this.money = player.money;
|
||||||
|
this.opiumHeld = player.opiumHeld;
|
||||||
|
this.silkHeld = player.silkHeld;
|
||||||
|
this.generalHeld = player.generalHeld;
|
||||||
|
this.armsHeld = player.armsHeld;
|
||||||
|
this.location = player.location;
|
||||||
|
this.guns = player.guns;
|
||||||
|
this.HP = player.HP;
|
||||||
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
@@ -122,15 +130,4 @@ public class Player {
|
|||||||
System.out.println("Game over");
|
System.out.println("Game over");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
|
||||||
ShipWarfare littyWarfare = new ShipWarfare();
|
|
||||||
TaipanShop littyShop = new TaipanShop();
|
|
||||||
|
|
||||||
littyShop.shop();
|
|
||||||
|
|
||||||
littyWarfare.peasantFleetAttack();
|
|
||||||
|
|
||||||
littyShop.shop();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user