Update Player.java

completed javadocs
This commit is contained in:
Vikramb987
2019-03-24 22:10:30 -06:00
committed by GitHub
parent 384a874e09
commit 016b765e3a

View File

@@ -32,6 +32,9 @@ public class Player implements Serializable {
private int generalPrice = 8;
private int isPriceChanged = 0;
/**
* default constructor for player
*/
public Player(){
}
@@ -44,10 +47,20 @@ public class Player implements Serializable {
setPlayer(player);
}
/**
* getter for this player object
*
* @return a copy of this player object
*/
public Player getPlayer(){
return new Player(this);
}
/**
* copies the provided player's properties into the instance variable of this object
*
* @param player
*/
public void setPlayer(Player player){
this.name = player.name;
this.bank = player.bank;