Added javadocs

This commit is contained in:
Siddhant Dewani
2019-03-24 22:20:00 -06:00
parent 016b765e3a
commit ffc2000c70
4 changed files with 31 additions and 9 deletions

View File

@@ -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

View File

@@ -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"));

View File

@@ -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 {
/**

View File

@@ -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");