Added Javadocs comments
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user