From ffc2000c7057e0043863dc9ef8f1ed7382114c91 Mon Sep 17 00:00:00 2001 From: Siddhant Dewani Date: Sun, 24 Mar 2019 22:20:00 -0600 Subject: [PATCH] Added javadocs --- src/BankGUI.java | 5 +++++ src/FileSaving.java | 10 ++++++++++ src/LoanSharkGUI.java | 6 ++++++ src/RandomEventGUI.java | 19 ++++++++++--------- 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/BankGUI.java b/src/BankGUI.java index 0c41604..8218d0f 100644 --- a/src/BankGUI.java +++ b/src/BankGUI.java @@ -12,6 +12,11 @@ import javafx.scene.layout.VBox; import javafx.stage.Stage; public class BankGUI extends Player{ + /** + * 2019-03-10 + * Authors: Siddhant Dewani + * BankGUI allows the user to store cash and gain interest off of the cash + */ /** * Class Constructor that takes in a type player as a parameter diff --git a/src/FileSaving.java b/src/FileSaving.java index 6321d7e..b5143de 100644 --- a/src/FileSaving.java +++ b/src/FileSaving.java @@ -1,7 +1,17 @@ import java.io.*; +/** + * 2019-03-10 (Edited on 2019-03-19) + * Authors: + * FileSaving Class allows the user to save the current status of the game and to continue from where they left off. + */ public class FileSaving extends Player implements Serializable { + + /** + *loads the file of type player which contains all the player instances + * @return player + */ public Player loadFile() { try { InputStream in = new FileInputStream(new File("src/saves/playerSave.txt")); diff --git a/src/LoanSharkGUI.java b/src/LoanSharkGUI.java index 5a936f0..059fa81 100644 --- a/src/LoanSharkGUI.java +++ b/src/LoanSharkGUI.java @@ -11,6 +11,12 @@ import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.stage.Stage; +/** + * 2019-03-10 + * Authors: Siddhant Dewani + * LoanShark GUI Class allows the user to get a loan from the loan shark + */ + public class LoanSharkGUI extends Player { /** diff --git a/src/RandomEventGUI.java b/src/RandomEventGUI.java index 8f76704..30d3f48 100644 --- a/src/RandomEventGUI.java +++ b/src/RandomEventGUI.java @@ -8,6 +8,13 @@ import javafx.stage.Stage; import java.util.Random; +/** + * 2019-03-19 + * Authors: + * Random Event GUI class generates random events that occur during travel, such as fixing your ship, + * liu yen asking for money and to purchase a gun. + */ + public class RandomEventGUI extends Player{ private HBox hBox; @@ -160,10 +167,7 @@ public class RandomEventGUI extends Player{ - /** - * - * - */ + //if yes button is clicked, executes the code depending on the type of event yesButton.setOnAction(event -> { if(getPlayer().getMoney() > itemPrice) { //Buy Guns @@ -205,16 +209,13 @@ public class RandomEventGUI extends Player{ - /** - * - * - */ + //If the no button is clicked then it skips to the location screen you wanted to go to. noButton.setOnAction(event -> { TaipanShopGUI taipanShopGUI = new TaipanShopGUI(getPlayer()); taipanShopGUI.initializeShop(stage); stage.show(); }); - + //Creates the scene and window Scene root = new Scene(borderPane, 600, 480); root.getStylesheets().add("styleguide.css");