diff --git a/src/main.java b/src/main.java index a0e0942..f45a119 100644 --- a/src/main.java +++ b/src/main.java @@ -2,23 +2,47 @@ public class main { private Player player = new Player(); + /** + * getter method for the Player object player. + * + * @return returns a copy of the object player + */ + public Player getPlayer(){ Player copy = new Player(player); return copy; } + /** + * Initializes the Taipan shop with the players stats after the player finishes shopping, it updates the player object and returns it. + * + * @param shop player object from the main class used to update the shop class + */ + public void shop(TaipanShop shop){ shop.setPlayer(player); shop.shop(); player = shop.getPlayer(); } + /** + * Initializes the player object with 5 guns or $400 and $5000 debt. + * + * @param start player object from the main class used to update the start class + */ + public void start(Start start){ start.setPlayer(player); start.initialize(); player = start.getPlayer(); } + /** + * Updates main class with player data and starts the game. + * The game will only run as long as the player has not retired or has been destroyed. + * + */ + public static void main(String[] args) { main main = new main(); TaipanShop littyShop = new TaipanShop(main.getPlayer());