fixed the player object not retaining the changes that were applied
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -3,7 +3,7 @@
|
|||||||
<component name="ProjectKey">
|
<component name="ProjectKey">
|
||||||
<option name="state" value="project://63537948-39a4-48a0-9c97-34259a0fa913" />
|
<option name="state" value="project://63537948-39a4-48a0-9c97-34259a0fa913" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8.0_201" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8.0_191" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
<component name="SvnBranchConfigurationManager">
|
<component name="SvnBranchConfigurationManager">
|
||||||
|
|||||||
@@ -29,6 +29,22 @@ public class Player {
|
|||||||
this.debt = player.debt;
|
this.debt = player.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() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@@ -141,4 +157,5 @@ public class Player {
|
|||||||
System.out.flush();
|
System.out.flush();
|
||||||
System.out.println("Game over");
|
System.out.println("Game over");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user