Added Javadocs comments

This commit is contained in:
Nathan Lum
2019-02-25 17:45:06 -07:00
committed by GitHub
parent 237ce1da27
commit fcb0b50468

View File

@@ -3,21 +3,41 @@ public class Start
{
private Player player;
/**
* getter method for obtaining a player object.
*
* @return returns player object
*/
public Player getPlayer() {
Player playerTemp = new Player(player);
return playerTemp;
}
/**
* setter method that takes in a Player object as an argument.
*
* @param player object of the class Player
*/
public void setPlayer(Player player) {
Player playerTemp = new Player(player);
this.player = playerTemp;
}
/**
* Asks the user to input the name that they would like to be called in the game
*
* @param name the name that you would like to be called in the game
*/
public void setFirm (String name) {
if (name.length() <= 22) {
player.setName(name);
}
}
/**
* Initializes the game by asking for your name and if you would like to start with either: 1) money and a debt or
* 2) guns and no cash/debt.
*/
public void initialize()
{
Scanner userInput = new Scanner(System.in);
@@ -46,6 +66,10 @@ public class Start
}
/**
* Copy constructor.
* @param player object of the class Player
*/
public Start(Player player)
{
Player playerTemp = new Player(player);