Completed javadocs for shipwarfare GUI

This commit is contained in:
KahootChampion
2019-03-10 22:58:31 -06:00
parent 9b9af573a8
commit ba16ea1809
2 changed files with 59 additions and 34 deletions

69
.idea/workspace.xml generated
View File

@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="3114a2b9-4919-4fdf-8fd9-d03b60109ce4" name="Default Changelist" comment="Probably should upload">
<list default="true" id="3114a2b9-4919-4fdf-8fd9-d03b60109ce4" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/TaipanClone.iml" beforeDir="false" afterPath="$PROJECT_DIR$/TaipanClone.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Player.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Player.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ShipWarfareGUI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ShipWarfareGUI.java" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
@@ -18,11 +16,11 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/ShipWarfareGUI.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="203">
<caret line="254" selection-start-line="254" selection-end-line="254" />
<state relative-caret-position="7290">
<caret line="486" column="32" lean-forward="true" selection-start-line="486" selection-start-column="32" selection-end-line="486" selection-end-column="32" />
<folding>
<element signature="imports" expanded="true" />
</folding>
@@ -30,11 +28,11 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Player.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="22" column="22" lean-forward="true" selection-start-line="22" selection-start-column="22" selection-end-line="22" selection-end-column="22" />
<state>
<caret column="5" lean-forward="true" selection-start-column="5" selection-end-column="5" />
</state>
</provider>
</entry>
@@ -42,8 +40,8 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/TaipanShopGUI.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="915">
<caret line="76" column="16" selection-start-line="76" selection-start-column="16" selection-end-line="76" selection-end-column="16" />
<state relative-caret-position="810">
<caret line="69" column="16" selection-start-line="69" selection-start-column="16" selection-end-line="69" selection-end-column="16" />
</state>
</provider>
</entry>
@@ -133,8 +131,8 @@
<option value="$PROJECT_DIR$/src/ShipWarfare.java" />
<option value="$PROJECT_DIR$/src/TaipanShopGUI.java" />
<option value="$PROJECT_DIR$/src/TravelGUI.java" />
<option value="$PROJECT_DIR$/src/ShipWarfareGUI.java" />
<option value="$PROJECT_DIR$/src/Player.java" />
<option value="$PROJECT_DIR$/src/ShipWarfareGUI.java" />
</list>
</option>
</component>
@@ -174,7 +172,7 @@
<property name="ChangesTree.GroupingKeys" value="" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1552279380815" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1552280276915" />
<property name="extract.method.default.visibility" value="private" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../GitHub/Cpsc233" />
<property name="project.structure.last.edited" value="Modules" />
@@ -289,7 +287,7 @@
<workItem from="1552240770629" duration="40000" />
<workItem from="1552241394045" duration="178000" />
<workItem from="1552254283748" duration="9473000" />
<workItem from="1552277298937" duration="1205000" />
<workItem from="1552277298937" duration="2115000" />
</task>
<task id="LOCAL-00001" summary="This should fix the ShipWarfare file and bring it up to date with the rest of the file.">
<created>1550458470138</created>
@@ -522,11 +520,18 @@
<option name="project" value="LOCAL" />
<updated>1552270321402</updated>
</task>
<option name="localTasksCounter" value="34" />
<task id="LOCAL-00034" summary="Fixed ShipWarfare bug about one-shotting.">
<created>1552279406065</created>
<option name="number" value="00034" />
<option name="presentableId" value="LOCAL-00034" />
<option name="project" value="LOCAL" />
<updated>1552279406066</updated>
</task>
<option name="localTasksCounter" value="35" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="74278000" />
<option name="totallyTimeSpent" value="75188000" />
</component>
<component name="ToolWindowManager">
<frame x="6" y="26" width="1189" height="652" extended-state="0" />
@@ -629,7 +634,6 @@
<ignored-roots>
<path value="$PROJECT_DIR$" />
</ignored-roots>
<MESSAGE value="Fixed the commenting on a lot of the code. Also added some stuff to Travel, fixed some bugs." />
<MESSAGE value="Added time stuff to Shipwarfare GUI" />
<MESSAGE value="Nitified of getting attacked" />
<MESSAGE value="Notified of getting attacked" />
@@ -654,7 +658,8 @@
<MESSAGE value="Completed SHipWarfareGUI" />
<MESSAGE value="Completed ShipWarfareGUI" />
<MESSAGE value="Probably should upload" />
<option name="LAST_COMMIT_MESSAGE" value="Probably should upload" />
<MESSAGE value="Fixed ShipWarfare bug about one-shotting." />
<option name="LAST_COMMIT_MESSAGE" value="Fixed ShipWarfare bug about one-shotting." />
</component>
<component name="editorHistoryManager">
<entry file="uml://JAVA/ShipWarfare">
@@ -741,20 +746,10 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/ShipWarfareGUI.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="203">
<caret line="254" selection-start-line="254" selection-end-line="254" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/TaipanShopGUI.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="915">
<caret line="76" column="16" selection-start-line="76" selection-start-column="16" selection-end-line="76" selection-end-column="16" />
<state relative-caret-position="810">
<caret line="69" column="16" selection-start-line="69" selection-start-column="16" selection-end-line="69" selection-end-column="16" />
</state>
</provider>
</entry>
@@ -774,8 +769,18 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/Player.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="22" column="22" lean-forward="true" selection-start-line="22" selection-start-column="22" selection-end-line="22" selection-end-column="22" />
<state>
<caret column="5" lean-forward="true" selection-start-column="5" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/ShipWarfareGUI.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="7290">
<caret line="486" column="32" lean-forward="true" selection-start-line="486" selection-start-column="32" selection-end-line="486" selection-end-column="32" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>

View File

@@ -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<ActionEvent>() {
@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<ActionEvent>() {
@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<ActionEvent>() {
@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<ActionEvent>() {
@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();