Fixed the loot system a bit
This commit is contained in:
66
.idea/workspace.xml
generated
66
.idea/workspace.xml
generated
@@ -1,12 +1,7 @@
|
|||||||
<?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="Shipwarfare fight button GUI almost complete">
|
<list default="true" id="3114a2b9-4919-4fdf-8fd9-d03b60109ce4" name="Default Changelist" comment="" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.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/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/" />
|
<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/" />
|
||||||
<ignored path="$PROJECT_DIR$/.idea/shelf/" />
|
<ignored path="$PROJECT_DIR$/.idea/shelf/" />
|
||||||
@@ -18,7 +13,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="FileEditorManager">
|
<component name="FileEditorManager">
|
||||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
<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/ShipWarfare.java">
|
<entry file="file://$PROJECT_DIR$/src/ShipWarfare.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="199">
|
<state relative-caret-position="199">
|
||||||
@@ -30,23 +25,6 @@
|
|||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<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="310">
|
|
||||||
<caret line="216" column="5" lean-forward="true" selection-start-line="216" selection-start-column="5" selection-end-line="216" selection-end-column="5" />
|
|
||||||
<folding>
|
|
||||||
<element signature="imports" expanded="true" />
|
|
||||||
<element signature="e#762#793#0" expanded="true" />
|
|
||||||
<element signature="e#1354#1355#0" expanded="true" />
|
|
||||||
<element signature="e#1382#1383#0" expanded="true" />
|
|
||||||
<element signature="e#17505#17506#0" expanded="true" />
|
|
||||||
<element signature="e#17543#17544#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
<file pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/src/main.java">
|
<entry file="file://$PROJECT_DIR$/src/main.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
@@ -288,7 +266,7 @@
|
|||||||
<workItem from="1552198897279" duration="7000" />
|
<workItem from="1552198897279" duration="7000" />
|
||||||
<workItem from="1552199842131" duration="998000" />
|
<workItem from="1552199842131" duration="998000" />
|
||||||
<workItem from="1552201459117" duration="275000" />
|
<workItem from="1552201459117" duration="275000" />
|
||||||
<workItem from="1552203562938" duration="2064000" />
|
<workItem from="1552203562938" duration="2174000" />
|
||||||
</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>
|
||||||
@@ -444,11 +422,18 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1552203599900</updated>
|
<updated>1552203599900</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="23" />
|
<task id="LOCAL-00023" summary="Fixed numOfShips method for ShipWarfareGUI">
|
||||||
|
<created>1552205678080</created>
|
||||||
|
<option name="number" value="00023" />
|
||||||
|
<option name="presentableId" value="LOCAL-00023" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1552205678080</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="24" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TimeTrackingManager">
|
<component name="TimeTrackingManager">
|
||||||
<option name="totallyTimeSpent" value="62404000" />
|
<option name="totallyTimeSpent" value="62514000" />
|
||||||
</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" />
|
||||||
@@ -574,7 +559,8 @@
|
|||||||
<MESSAGE value="Forces you to fight in ShipWarfareGUI unfortunately" />
|
<MESSAGE value="Forces you to fight in ShipWarfareGUI unfortunately" />
|
||||||
<MESSAGE value="ShipWarfare fight button coming along nicely" />
|
<MESSAGE value="ShipWarfare fight button coming along nicely" />
|
||||||
<MESSAGE value="Shipwarfare fight button GUI almost complete" />
|
<MESSAGE value="Shipwarfare fight button GUI almost complete" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Shipwarfare fight button GUI almost complete" />
|
<MESSAGE value="Fixed numOfShips method for ShipWarfareGUI" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="Fixed numOfShips method for ShipWarfareGUI" />
|
||||||
</component>
|
</component>
|
||||||
<component name="editorHistoryManager">
|
<component name="editorHistoryManager">
|
||||||
<entry file="uml://JAVA/ShipWarfare">
|
<entry file="uml://JAVA/ShipWarfare">
|
||||||
@@ -651,16 +637,6 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/ShipWarfare.java">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="199">
|
|
||||||
<caret line="331" lean-forward="true" selection-start-line="331" selection-end-line="331" />
|
|
||||||
<folding>
|
|
||||||
<element signature="imports" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/Player.java">
|
<entry file="file://$PROJECT_DIR$/src/Player.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="89">
|
<state relative-caret-position="89">
|
||||||
@@ -670,8 +646,8 @@
|
|||||||
</entry>
|
</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="310">
|
<state relative-caret-position="92">
|
||||||
<caret line="216" column="5" lean-forward="true" selection-start-line="216" selection-start-column="5" selection-end-line="216" selection-end-column="5" />
|
<caret line="206" column="28" selection-end-line="662" selection-end-column="1" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
<element signature="e#762#793#0" expanded="true" />
|
<element signature="e#762#793#0" expanded="true" />
|
||||||
@@ -683,6 +659,16 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/ShipWarfare.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="199">
|
||||||
|
<caret line="331" lean-forward="true" selection-start-line="331" selection-end-line="331" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
</component>
|
</component>
|
||||||
<component name="masterDetails">
|
<component name="masterDetails">
|
||||||
<states>
|
<states>
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public class ShipWarfareGUI extends Application {
|
|||||||
private Label HPLeft;
|
private Label HPLeft;
|
||||||
private Label gunsLeftOrTaken;
|
private Label gunsLeftOrTaken;
|
||||||
private Label continueToFight;
|
private Label continueToFight;
|
||||||
|
private int counter1;
|
||||||
|
|
||||||
|
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
@@ -181,9 +182,12 @@ public class ShipWarfareGUI extends Application {
|
|||||||
* @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){
|
||||||
|
counter1++;
|
||||||
this.numOfPeasantShips = numOfPeasantShips;
|
this.numOfPeasantShips = numOfPeasantShips;
|
||||||
startingPeasantShips = numOfPeasantShips;
|
if(counter1==1) {
|
||||||
|
startingPeasantShips = numOfPeasantShips;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -487,8 +491,7 @@ public class ShipWarfareGUI extends Application {
|
|||||||
if (exitValue == 1) {
|
if (exitValue == 1) {
|
||||||
wipe();
|
wipe();
|
||||||
chooseFightOrRun.setText(String.format("Ayy We won! We survived at %d%% ship status!", player.getHP()));
|
chooseFightOrRun.setText(String.format("Ayy We won! We survived at %d%% ship status!", player.getHP()));
|
||||||
System.out.printf("\nGot eem\nVictory!\nIt appears we have defeated the enemy fleet and made it out at %d%% ship status\n", player.getHP());
|
calculateLoot = (startingPeasantShips *100) + randomValue.nextInt(startingPeasantShips) *200;
|
||||||
calculateLoot = (randomValue.nextInt(startingPeasantShips) + startingPeasantShips) * 100;
|
|
||||||
player.setMoney(player.getMoney() + calculateLoot);
|
player.setMoney(player.getMoney() + calculateLoot);
|
||||||
report.setText(String.format("We got $%,d! ", calculateLoot));
|
report.setText(String.format("We got $%,d! ", calculateLoot));
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user