diff --git a/.idea/misc.xml b/.idea/misc.xml index 8466a13..479cb83 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,7 +3,7 @@ - + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 1129f0e..dab5ad0 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,8 +1,10 @@ - + + + @@ -32,7 +34,7 @@ - + @@ -40,8 +42,8 @@ - - + + @@ -49,8 +51,8 @@ - - + + @@ -62,8 +64,8 @@ - - + + @@ -129,6 +131,7 @@ loan(); player.getCargoSpace() delayForSeconds(1) + delayForSeconds(1) @@ -145,8 +148,8 @@ @@ -422,17 +425,24 @@ - - + @@ -441,13 +451,13 @@ - + - + @@ -523,7 +533,8 @@ - @@ -579,10 +590,24 @@ + + + + + + + + + + + + + + - - + + @@ -590,24 +615,10 @@ - - - - - - - - - - - - - - - - + + @@ -671,6 +682,7 @@ diff --git a/out/production/TaipanClone/ShipWarfare.class b/out/production/TaipanClone/ShipWarfare.class index 78830e1..0127a96 100644 Binary files a/out/production/TaipanClone/ShipWarfare.class and b/out/production/TaipanClone/ShipWarfare.class differ diff --git a/src/ShipWarfare.java b/src/ShipWarfare.java index 9ea3055..2beb1ae 100644 --- a/src/ShipWarfare.java +++ b/src/ShipWarfare.java @@ -14,6 +14,10 @@ public class ShipWarfare extends Player { private String pirateName = "Liu Yen"; private Player player; + /** + * Class Constructor that takes in a type player as a parameter + * @param player object of the class Player + */ public ShipWarfare(Player player) { Player playerDummy = new Player(player); this.player = playerDummy; @@ -23,7 +27,6 @@ public class ShipWarfare extends Player { * setter method for player * @param player object of the class Player */ - public void setPlayer(Player player) { Player playerDummy = new Player(player); this.player = playerDummy; @@ -33,7 +36,6 @@ public class ShipWarfare extends Player { * getter method for obtaining a player object. * @return returns player object */ - public Player getPlayer() { Player playerDummy = new Player(player); return playerDummy; @@ -204,10 +206,10 @@ public class ShipWarfare extends Player { /** * The user faces off against the litty ships and either prevails, dies, or runs away + * The loot for defeating a litty fleet is much higher than that of a peasant one * @return true if the user wins, loses, or flees, it returns false otherwise * @throws Exception in case of errors due to the delay */ - //The loot for defeating a litty fleet is much higher than that of a peasant one public boolean destroyLittyShipsOrEscape() throws Exception { int calculateLoot = 0; int chanceOfEnemyRun = 0;