Completed SHipWarfareGUI

This commit is contained in:
KahootChampion
2019-03-10 20:00:36 -06:00
parent 2198fffbd5
commit 664d194d7b
3 changed files with 44 additions and 22 deletions

60
.idea/workspace.xml generated
View File

@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="3114a2b9-4919-4fdf-8fd9-d03b60109ce4" name="Default Changelist" comment="Just checking"> <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$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ShipWarfareGUI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ShipWarfareGUI.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/ShipWarfareGUI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ShipWarfareGUI.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TaipanShopGUI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TaipanShopGUI.java" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/out/" /> <ignored path="$PROJECT_DIR$/out/" />
<ignored path="C:\Users\Harkamal Randhawa\IdeaProjects\TaipanClone\.idea\shelf/" /> <ignored path="C:\Users\Harkamal Randhawa\IdeaProjects\TaipanClone\.idea\shelf/" />
@@ -19,8 +20,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="360"> <state relative-caret-position="188">
<caret line="314" selection-start-line="314" selection-end-line="314" /> <caret line="384" column="53" lean-forward="true" selection-start-line="384" selection-start-column="53" selection-end-line="384" selection-end-column="53" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
</folding> </folding>
@@ -28,6 +29,15 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<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="38">
<caret line="189" column="22" selection-start-line="189" selection-start-column="20" selection-end-line="189" selection-end-column="22" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<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">
@@ -57,9 +67,6 @@
</component> </component>
<component name="FindInProjectRecents"> <component name="FindInProjectRecents">
<findStrings> <findStrings>
<find>player</find>
<find>numOfPeasantShips</find>
<find>peasant</find>
<find>litty</find> <find>litty</find>
<find>userAttacks</find> <find>userAttacks</find>
<find>numOfLittyShips</find> <find>numOfLittyShips</find>
@@ -87,6 +94,9 @@
<find>dang it</find> <find>dang it</find>
<find>destroy</find> <find>destroy</find>
<find>destroyPeas</find> <find>destroyPeas</find>
<find>continue</find>
<find>cash</find>
<find>op</find>
</findStrings> </findStrings>
<replaceStrings> <replaceStrings>
<replace>HP</replace> <replace>HP</replace>
@@ -113,6 +123,7 @@
<option value="$PROJECT_DIR$/src/Player.java" /> <option value="$PROJECT_DIR$/src/Player.java" />
<option value="$PROJECT_DIR$/src/ShipWarfare.java" /> <option value="$PROJECT_DIR$/src/ShipWarfare.java" />
<option value="$PROJECT_DIR$/src/ShipWarfareGUI.java" /> <option value="$PROJECT_DIR$/src/ShipWarfareGUI.java" />
<option value="$PROJECT_DIR$/src/TaipanShopGUI.java" />
</list> </list>
</option> </option>
</component> </component>
@@ -152,7 +163,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="1552268422526" /> <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1552269473452" />
<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="Project" /> <property name="project.structure.last.edited" value="Project" />
@@ -266,7 +277,7 @@
<workItem from="1552238757321" duration="742000" /> <workItem from="1552238757321" duration="742000" />
<workItem from="1552240770629" duration="40000" /> <workItem from="1552240770629" duration="40000" />
<workItem from="1552241394045" duration="178000" /> <workItem from="1552241394045" duration="178000" />
<workItem from="1552254283748" duration="5646000" /> <workItem from="1552254283748" duration="6697000" />
</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>
@@ -471,11 +482,18 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1552254331759</updated> <updated>1552254331759</updated>
</task> </task>
<option name="localTasksCounter" value="30" /> <task id="LOCAL-00030" summary="A lot of errors but easily fixable SHipwarfareGUI">
<created>1552268490741</created>
<option name="number" value="00030" />
<option name="presentableId" value="LOCAL-00030" />
<option name="project" value="LOCAL" />
<updated>1552268490741</updated>
</task>
<option name="localTasksCounter" value="31" />
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="69246000" /> <option name="totallyTimeSpent" value="70297000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="48" y="23" width="1189" height="652" extended-state="0" /> <frame x="48" y="23" width="1189" height="652" extended-state="0" />
@@ -578,7 +596,6 @@
<ignored-roots> <ignored-roots>
<path value="$PROJECT_DIR$" /> <path value="$PROJECT_DIR$" />
</ignored-roots> </ignored-roots>
<MESSAGE value="Added disasters as well as removing a bug from the flee method in Haris's code" />
<MESSAGE value="Fixed a bunch of stuff inside of Travel, but also discovered a MASSIVE problem with our code" /> <MESSAGE value="Fixed a bunch of stuff inside of Travel, but also discovered a MASSIVE problem with our code" />
<MESSAGE value="Fixed stupid problem where you can't access methods above yours" /> <MESSAGE value="Fixed stupid problem where you can't access methods above yours" />
<MESSAGE value="Brought back Vikram's changes" /> <MESSAGE value="Brought back Vikram's changes" />
@@ -603,7 +620,8 @@
<MESSAGE value="Fined minor bugs in shipwarfareGUI" /> <MESSAGE value="Fined minor bugs in shipwarfareGUI" />
<MESSAGE value="Fined minor bugs in shipwarfareGUI including the &quot;gun frustration&quot; variable" /> <MESSAGE value="Fined minor bugs in shipwarfareGUI including the &quot;gun frustration&quot; variable" />
<MESSAGE value="Just checking" /> <MESSAGE value="Just checking" />
<option name="LAST_COMMIT_MESSAGE" value="Just checking" /> <MESSAGE value="A lot of errors but easily fixable SHipwarfareGUI" />
<option name="LAST_COMMIT_MESSAGE" value="A lot of errors but easily fixable SHipwarfareGUI" />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="uml://JAVA/ShipWarfare"> <entry file="uml://JAVA/ShipWarfare">
@@ -697,13 +715,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="-11142">
<caret line="17" column="13" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/TravelGUI.java"> <entry file="file://$PROJECT_DIR$/src/TravelGUI.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15"> <state relative-caret-position="15">
@@ -718,10 +729,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="38">
<caret line="189" column="22" selection-start-line="189" selection-start-column="20" selection-end-line="189" selection-end-column="22" />
</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="360"> <state relative-caret-position="188">
<caret line="314" selection-start-line="314" selection-end-line="314" /> <caret line="384" column="53" lean-forward="true" selection-start-line="384" selection-start-column="53" selection-end-line="384" selection-end-column="53" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
</folding> </folding>

View File

@@ -380,6 +380,8 @@ public class ShipWarfareGUI {
if (destroyPeasantShipsOrEscape()){ if (destroyPeasantShipsOrEscape()){
completeWipe(); completeWipe();
continueButton.setVisible(true); continueButton.setVisible(true);
fightButton.setVisible(false);
runButton.setVisible(false);
continueButton.setOnAction(new EventHandler<ActionEvent>() { continueButton.setOnAction(new EventHandler<ActionEvent>() {
@Override @Override
public void handle(ActionEvent event) { public void handle(ActionEvent event) {
@@ -416,6 +418,8 @@ public class ShipWarfareGUI {
if(destroyPeasantShipsOrEscape()==true){ if(destroyPeasantShipsOrEscape()==true){
completeWipe(); completeWipe();
continueButton.setVisible(true); continueButton.setVisible(true);
fightButton.setVisible(false);
runButton.setVisible(false);
continueButton.setOnAction(new EventHandler<ActionEvent>() { continueButton.setOnAction(new EventHandler<ActionEvent>() {
@Override @Override
public void handle(ActionEvent event) { public void handle(ActionEvent event) {

View File

@@ -803,7 +803,7 @@ public class TaipanShopGUI {
gunsText.setText(String.format("Guns %d\n\n\n\n ", player.getGuns())); gunsText.setText(String.format("Guns %d\n\n\n\n ", player.getGuns()));
inventoryHeldText.setText(String.format("\n %d\n %d\n %d\n %d", player.getOpiumHeld(), player.getSilkHeld(), player.getArmsHeld(), player.getGeneralHeld())); inventoryHeldText.setText(String.format("\n %d\n %d\n %d\n %d", player.getOpiumHeld(), player.getSilkHeld(), player.getArmsHeld(), player.getGeneralHeld()));
shipStatusText.setText(String.format("\tDebt\n\t%d\n\n\tShip status\n\t%s: %d", player.getDebt(), shipStatusString(), player.getHP())); shipStatusText.setText(String.format("\tDebt\n\t%d\n\n\tShip status\n\t%s: %d", player.getDebt(), shipStatusString(), player.getHP()));
cashText.setText(String.format(" Cash: %d", player.getMoney())); cashText.setText(String.format(" Cash: $%,d", player.getMoney()));
bankText.setText(String.format("Bank: %d", player.getBank())); bankText.setText(String.format("Bank: %d", player.getBank()));
} }