Added javadocs
This commit is contained in:
@@ -12,6 +12,11 @@ import javafx.scene.layout.VBox;
|
|||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
public class BankGUI extends Player{
|
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
|
* Class Constructor that takes in a type player as a parameter
|
||||||
|
|||||||
@@ -1,7 +1,17 @@
|
|||||||
import java.io.*;
|
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 {
|
public class FileSaving extends Player implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*loads the file of type player which contains all the player instances
|
||||||
|
* @return player
|
||||||
|
*/
|
||||||
public Player loadFile() {
|
public Player loadFile() {
|
||||||
try {
|
try {
|
||||||
InputStream in = new FileInputStream(new File("src/saves/playerSave.txt"));
|
InputStream in = new FileInputStream(new File("src/saves/playerSave.txt"));
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ import javafx.scene.layout.HBox;
|
|||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import javafx.stage.Stage;
|
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 {
|
public class LoanSharkGUI extends Player {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,6 +8,13 @@ import javafx.stage.Stage;
|
|||||||
|
|
||||||
import java.util.Random;
|
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{
|
public class RandomEventGUI extends Player{
|
||||||
|
|
||||||
private HBox hBox;
|
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 -> {
|
yesButton.setOnAction(event -> {
|
||||||
if(getPlayer().getMoney() > itemPrice) {
|
if(getPlayer().getMoney() > itemPrice) {
|
||||||
//Buy Guns
|
//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 -> {
|
noButton.setOnAction(event -> {
|
||||||
TaipanShopGUI taipanShopGUI = new TaipanShopGUI(getPlayer());
|
TaipanShopGUI taipanShopGUI = new TaipanShopGUI(getPlayer());
|
||||||
taipanShopGUI.initializeShop(stage);
|
taipanShopGUI.initializeShop(stage);
|
||||||
stage.show();
|
stage.show();
|
||||||
});
|
});
|
||||||
|
//Creates the scene and window
|
||||||
Scene root = new Scene(borderPane, 600, 480);
|
Scene root = new Scene(borderPane, 600, 480);
|
||||||
root.getStylesheets().add("styleguide.css");
|
root.getStylesheets().add("styleguide.css");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user