Added to my javadocs a bit
This commit is contained in:
43
.idea/workspace.xml
generated
43
.idea/workspace.xml
generated
@@ -19,8 +19,8 @@
|
|||||||
<file pinned="false" current-in-tab="true">
|
<file pinned="false" current-in-tab="true">
|
||||||
<entry file="file://$PROJECT_DIR$/src/ShipWarfareGUI.java">
|
<entry file="file://$PROJECT_DIR$/src/ShipWarfareGUI.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="7290">
|
<state relative-caret-position="379">
|
||||||
<caret line="486" column="32" lean-forward="true" selection-start-line="486" selection-start-column="32" selection-end-line="486" selection-end-column="32" />
|
<caret line="76" column="6" lean-forward="true" selection-start-line="76" selection-start-column="6" selection-end-line="76" selection-end-column="6" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<file pinned="false" current-in-tab="false">
|
<file pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/src/TaipanShopGUI.java">
|
<entry file="file://$PROJECT_DIR$/src/TaipanShopGUI.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="810">
|
<state relative-caret-position="662">
|
||||||
<caret line="69" column="16" selection-start-line="69" selection-start-column="16" selection-end-line="69" selection-end-column="16" />
|
<caret line="69" column="16" selection-start-line="69" selection-start-column="16" selection-end-line="69" selection-end-column="16" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
<property name="ChangesTree.GroupingKeys" value="" />
|
<property name="ChangesTree.GroupingKeys" value="" />
|
||||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||||
<property name="aspect.path.notification.shown" value="true" />
|
<property name="aspect.path.notification.shown" value="true" />
|
||||||
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1552280276915" />
|
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1552280591238" />
|
||||||
<property name="extract.method.default.visibility" value="private" />
|
<property name="extract.method.default.visibility" value="private" />
|
||||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/../GitHub/Cpsc233" />
|
<property name="last_opened_file_path" value="$PROJECT_DIR$/../GitHub/Cpsc233" />
|
||||||
<property name="project.structure.last.edited" value="Modules" />
|
<property name="project.structure.last.edited" value="Modules" />
|
||||||
@@ -287,7 +287,7 @@
|
|||||||
<workItem from="1552240770629" duration="40000" />
|
<workItem from="1552240770629" duration="40000" />
|
||||||
<workItem from="1552241394045" duration="178000" />
|
<workItem from="1552241394045" duration="178000" />
|
||||||
<workItem from="1552254283748" duration="9473000" />
|
<workItem from="1552254283748" duration="9473000" />
|
||||||
<workItem from="1552277298937" duration="2115000" />
|
<workItem from="1552277298937" duration="2427000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="This should fix the ShipWarfare file and bring it up to date with the rest of the file.">
|
<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>
|
<created>1550458470138</created>
|
||||||
@@ -527,11 +527,18 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1552279406066</updated>
|
<updated>1552279406066</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="35" />
|
<task id="LOCAL-00035" summary="Completed javadocs for shipwarfare GUI">
|
||||||
|
<created>1552280311398</created>
|
||||||
|
<option name="number" value="00035" />
|
||||||
|
<option name="presentableId" value="LOCAL-00035" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1552280311399</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="36" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TimeTrackingManager">
|
<component name="TimeTrackingManager">
|
||||||
<option name="totallyTimeSpent" value="75188000" />
|
<option name="totallyTimeSpent" value="75500000" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ToolWindowManager">
|
<component name="ToolWindowManager">
|
||||||
<frame x="6" y="26" width="1189" height="652" extended-state="0" />
|
<frame x="6" y="26" width="1189" height="652" extended-state="0" />
|
||||||
@@ -634,7 +641,6 @@
|
|||||||
<ignored-roots>
|
<ignored-roots>
|
||||||
<path value="$PROJECT_DIR$" />
|
<path value="$PROJECT_DIR$" />
|
||||||
</ignored-roots>
|
</ignored-roots>
|
||||||
<MESSAGE value="Added time stuff to Shipwarfare GUI" />
|
|
||||||
<MESSAGE value="Nitified of getting attacked" />
|
<MESSAGE value="Nitified of getting attacked" />
|
||||||
<MESSAGE value="Notified of getting attacked" />
|
<MESSAGE value="Notified of getting attacked" />
|
||||||
<MESSAGE value="Added fight stuff" />
|
<MESSAGE value="Added fight stuff" />
|
||||||
@@ -659,7 +665,8 @@
|
|||||||
<MESSAGE value="Completed ShipWarfareGUI" />
|
<MESSAGE value="Completed ShipWarfareGUI" />
|
||||||
<MESSAGE value="Probably should upload" />
|
<MESSAGE value="Probably should upload" />
|
||||||
<MESSAGE value="Fixed ShipWarfare bug about one-shotting." />
|
<MESSAGE value="Fixed ShipWarfare bug about one-shotting." />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Fixed ShipWarfare bug about one-shotting." />
|
<MESSAGE value="Completed javadocs for shipwarfare GUI" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="Completed javadocs for shipwarfare GUI" />
|
||||||
</component>
|
</component>
|
||||||
<component name="editorHistoryManager">
|
<component name="editorHistoryManager">
|
||||||
<entry file="uml://JAVA/ShipWarfare">
|
<entry file="uml://JAVA/ShipWarfare">
|
||||||
@@ -746,13 +753,6 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/TaipanShopGUI.java">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<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>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/MainGUI.java">
|
<entry file="file://$PROJECT_DIR$/src/MainGUI.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="780">
|
<state relative-caret-position="780">
|
||||||
@@ -774,10 +774,17 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/TaipanShopGUI.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="662">
|
||||||
|
<caret line="69" column="16" selection-start-line="69" selection-start-column="16" selection-end-line="69" selection-end-column="16" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/ShipWarfareGUI.java">
|
<entry file="file://$PROJECT_DIR$/src/ShipWarfareGUI.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="7290">
|
<state relative-caret-position="379">
|
||||||
<caret line="486" column="32" lean-forward="true" selection-start-line="486" selection-start-column="32" selection-end-line="486" selection-end-column="32" />
|
<caret line="76" column="6" lean-forward="true" selection-start-line="76" selection-start-column="6" selection-end-line="76" selection-end-column="6" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import javafx.scene.layout.GridPane;
|
|||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
public class ShipWarfareGUI {
|
public class ShipWarfareGUI {
|
||||||
@@ -32,11 +33,8 @@ public class ShipWarfareGUI {
|
|||||||
private Button continueButton;
|
private Button continueButton;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
/**
|
/**
|
||||||
* constructor; only runs when a Player object is provided. The constructor is fully encapsulated.
|
* constructor; only runs when a Player object is provided. The constructor is fully encapsulated.
|
||||||
*
|
|
||||||
* @param player is a Player object that will be copied and the player instance variable is set to the copy.
|
* @param player is a Player object that will be copied and the player instance variable is set to the copy.
|
||||||
*/
|
*/
|
||||||
public ShipWarfareGUI(Player player) {
|
public ShipWarfareGUI(Player player) {
|
||||||
@@ -44,9 +42,6 @@ public class ShipWarfareGUI {
|
|||||||
this.player = playerDummy;
|
this.player = playerDummy;
|
||||||
}
|
}
|
||||||
|
|
||||||
//public static void main(String args[]) {
|
|
||||||
// launch(args);
|
|
||||||
//}
|
|
||||||
|
|
||||||
private int numOfPeasantShips = 0;
|
private int numOfPeasantShips = 0;
|
||||||
private int numOfLittyShips = 0;
|
private int numOfLittyShips = 0;
|
||||||
@@ -59,6 +54,7 @@ public class ShipWarfareGUI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* setter method for player
|
* setter method for player
|
||||||
|
*
|
||||||
* @param player object of the class Player
|
* @param player object of the class Player
|
||||||
*/
|
*/
|
||||||
public void setPlayer(Player player) {
|
public void setPlayer(Player player) {
|
||||||
@@ -68,6 +64,7 @@ public class ShipWarfareGUI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* getter method for obtaining a player object.
|
* getter method for obtaining a player object.
|
||||||
|
*
|
||||||
* @return returns player object
|
* @return returns player object
|
||||||
*/
|
*/
|
||||||
public Player getPlayer() {
|
public Player getPlayer() {
|
||||||
@@ -77,6 +74,7 @@ public class ShipWarfareGUI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* setter method that takes in an integer as an argument
|
* setter method that takes in an integer as an argument
|
||||||
|
*
|
||||||
* @param numOfPeasantShips the number of ships to be used in the peasant fleet attack
|
* @param numOfPeasantShips the number of ships to be used in the peasant fleet attack
|
||||||
*/
|
*/
|
||||||
public void setNumOfPeasantShips(int numOfPeasantShips) {
|
public void setNumOfPeasantShips(int numOfPeasantShips) {
|
||||||
@@ -90,6 +88,7 @@ public class ShipWarfareGUI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of ships that attack is based on the amount of money one has on hand
|
* The number of ships that attack is based on the amount of money one has on hand
|
||||||
|
*
|
||||||
* @return the number of ships which will attack
|
* @return the number of ships which will attack
|
||||||
*/
|
*/
|
||||||
public int numOfShips() {
|
public int numOfShips() {
|
||||||
@@ -117,6 +116,7 @@ public class ShipWarfareGUI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* One in two chance of running away
|
* One in two chance of running away
|
||||||
|
*
|
||||||
* @return true if the user is allowed to run, false if not, the "default" is false
|
* @return true if the user is allowed to run, false if not, the "default" is false
|
||||||
*/
|
*/
|
||||||
public boolean runFromShips() {
|
public boolean runFromShips() {
|
||||||
@@ -160,6 +160,7 @@ public class ShipWarfareGUI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The user faces off against the peasant ships and either prevails, dies, or runs away
|
* The user faces off against the peasant ships and either prevails, dies, or runs away
|
||||||
|
*
|
||||||
* @return true if the user wins, loses, or flees, it returns false otherwise
|
* @return true if the user wins, loses, or flees, it returns false otherwise
|
||||||
* @throws Exception in case of errors due to the delay
|
* @throws Exception in case of errors due to the delay
|
||||||
*/
|
*/
|
||||||
@@ -208,7 +209,8 @@ public class ShipWarfareGUI {
|
|||||||
} else {
|
} else {
|
||||||
//continue;
|
//continue;
|
||||||
}
|
}
|
||||||
}if(userAttacks==true) {
|
}
|
||||||
|
if (userAttacks == true) {
|
||||||
report.setText(String.format("Report: Ships hit: %d, Shots missed: %d", hitCounter, missCounter));
|
report.setText(String.format("Report: Ships hit: %d, Shots missed: %d", hitCounter, missCounter));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -295,6 +297,7 @@ public class ShipWarfareGUI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the graphical part of ShipWarfare and includes all logic for the class
|
* 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
|
* @param stage sets the stage to which we will execute the scene of the ShipWarfare class
|
||||||
* @return stage so that another class can switch to the stage
|
* @return stage so that another class can switch to the stage
|
||||||
*/
|
*/
|
||||||
@@ -325,7 +328,6 @@ public class ShipWarfareGUI {
|
|||||||
continueButton.setVisible(false);
|
continueButton.setVisible(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BorderPane.setPrefHeight(400.0);
|
BorderPane.setPrefHeight(400.0);
|
||||||
BorderPane.setPrefWidth(600.0);
|
BorderPane.setPrefWidth(600.0);
|
||||||
hBox.setAlignment(javafx.geometry.Pos.CENTER);
|
hBox.setAlignment(javafx.geometry.Pos.CENTER);
|
||||||
@@ -352,7 +354,8 @@ public class ShipWarfareGUI {
|
|||||||
runButton.setId("Button2");
|
runButton.setId("Button2");
|
||||||
runButton.setMnemonicParsing(false);
|
runButton.setMnemonicParsing(false);
|
||||||
|
|
||||||
BorderPane.setBottom(hBox);runButton.setText("Run");
|
BorderPane.setBottom(hBox);
|
||||||
|
runButton.setText("Run");
|
||||||
|
|
||||||
BorderPane.setAlignment(vBox, javafx.geometry.Pos.CENTER);
|
BorderPane.setAlignment(vBox, javafx.geometry.Pos.CENTER);
|
||||||
vBox.setAlignment(javafx.geometry.Pos.TOP_CENTER);
|
vBox.setAlignment(javafx.geometry.Pos.TOP_CENTER);
|
||||||
@@ -485,6 +488,7 @@ public class ShipWarfareGUI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* sets scene and runs stage
|
* sets scene and runs stage
|
||||||
|
*
|
||||||
* @param primaryStage the stage in which the scene may be run and switched to
|
* @param primaryStage the stage in which the scene may be run and switched to
|
||||||
*/
|
*/
|
||||||
public void start(Stage primaryStage) {
|
public void start(Stage primaryStage) {
|
||||||
|
|||||||
Reference in New Issue
Block a user