From 2395eb32982932b54b907b88cba2a24322eef177 Mon Sep 17 00:00:00 2001 From: Vikramb987 <47336882+Vikramb987@users.noreply.github.com> Date: Thu, 21 Feb 2019 22:07:27 -0700 Subject: [PATCH] Update Player.java --- src/Player.java | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/src/Player.java b/src/Player.java index 8460447..2ec2b75 100644 --- a/src/Player.java +++ b/src/Player.java @@ -10,15 +10,23 @@ public class Player { private int location = 1; private int guns = 3; private int HP = 100; - - public int getDebt() { - return debt; - } - public void setDebt(int debt) { - this.debt = debt; - } - + public Player(){ + + } + + 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() { return name; } @@ -122,15 +130,4 @@ public class Player { 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(); - } - }