From ba16ea180978e40979e53f43c4d3559d5c10e860 Mon Sep 17 00:00:00 2001
From: KahootChampion
Date: Sun, 10 Mar 2019 22:58:31 -0600
Subject: [PATCH] Completed javadocs for shipwarfare GUI
---
.idea/workspace.xml | 69 ++++++++++++++++++++++-------------------
src/ShipWarfareGUI.java | 24 ++++++++++++--
2 files changed, 59 insertions(+), 34 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 1055077..b6e4175 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,10 +1,8 @@
-
+
-
-
@@ -18,11 +16,11 @@
-
+
-
-
+
+
@@ -30,11 +28,11 @@
-
+
-
-
+
+
@@ -42,8 +40,8 @@
-
-
+
+
@@ -133,8 +131,8 @@
-
+
@@ -174,7 +172,7 @@
-
+
@@ -289,7 +287,7 @@
-
+
1550458470138
@@ -522,11 +520,18 @@
1552270321402
-
+
+ 1552279406065
+
+
+
+ 1552279406066
+
+
-
+
@@ -629,7 +634,6 @@
-
@@ -654,7 +658,8 @@
-
+
+
@@ -741,20 +746,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -774,8 +769,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ShipWarfareGUI.java b/src/ShipWarfareGUI.java
index 5dac988..f028417 100644
--- a/src/ShipWarfareGUI.java
+++ b/src/ShipWarfareGUI.java
@@ -294,9 +294,9 @@ public class ShipWarfareGUI {
}
/**
- * Sets up the graphical part of ShipWarfare
+ * Sets up the graphical part of ShipWarfare and includes all logic for the class
* @param stage sets the stage to which we will execute the scene of the ShipWarfare class
- * @return
+ * @return stage so that another class can switch to the stage
*/
public Stage initializeShip(Stage stage){
@@ -384,6 +384,10 @@ public class ShipWarfareGUI {
//Fight
fightButton.setOnAction(new EventHandler() {
@Override
+ /**
+ * Fight Button, engages in fight logic and graphical interface
+ * @param event, once button is clicked, executes graphical information
+ */
public void handle(ActionEvent event) {
counter++;
chooseFightOrRun.setText("Ohh, Fight ehh?");
@@ -395,6 +399,10 @@ public class ShipWarfareGUI {
runButton.setVisible(false);
continueButton.setOnAction(new EventHandler() {
@Override
+ /**
+ * Switches to Taipan Shop scene
+ * @param event, once button is clicked, executes graphical information
+ */
public void handle(ActionEvent event) {
TaipanShopGUI shop = new TaipanShopGUI(player);
shop.initializeShop(stage);
@@ -417,6 +425,10 @@ public class ShipWarfareGUI {
//Flee
runButton.setOnAction(new EventHandler() {
@Override
+ /**
+ * Run Button, engages in run logic and graphical interface
+ * @param event, once button is clicked, executes graphical information
+ */
public void handle(ActionEvent event) {
chooseFightOrRun.setText("Ayy captain we will try to run!");
counter++;
@@ -433,6 +445,10 @@ public class ShipWarfareGUI {
runButton.setVisible(false);
continueButton.setOnAction(new EventHandler() {
@Override
+ /**
+ * Switches to Taipan Shop scene
+ * @param event, once button is clicked, executes graphical information
+ */
public void handle(ActionEvent event) {
TaipanShopGUI shop = new TaipanShopGUI(player);
shop.initializeShop(stage);
@@ -467,6 +483,10 @@ public class ShipWarfareGUI {
return stage;
}
+ /**
+ * sets scene and runs stage
+ * @param primaryStage the stage in which the scene may be run and switched to
+ */
public void start(Stage primaryStage){
primaryStage = initializeShip(primaryStage);
primaryStage.show();