Fixed some little problems with documenting.
This commit is contained in:
@@ -82,12 +82,10 @@ public class Travel {
|
|||||||
**/
|
**/
|
||||||
private void randomEventSea(int locationOfTravel) throws Exception {
|
private void randomEventSea(int locationOfTravel) throws Exception {
|
||||||
Random rand = new Random();
|
Random rand = new Random();
|
||||||
int randGenNum = rand.nextInt(4) + 1;
|
int randGenNum = rand.nextInt(3) + 1;
|
||||||
if (randGenNum == 1) {
|
if (randGenNum == 1) {
|
||||||
peasantFleet();
|
peasantFleet();
|
||||||
}else if (randGenNum == 2){
|
}else if (randGenNum == 2) {
|
||||||
littyFleet();
|
|
||||||
}else if (randGenNum == 3) {
|
|
||||||
disaster(locationOfTravel);
|
disaster(locationOfTravel);
|
||||||
System.out.println("We made it!");
|
System.out.println("We made it!");
|
||||||
}
|
}
|
||||||
@@ -132,17 +130,6 @@ public class Travel {
|
|||||||
player = attackShip.getPlayer();
|
player = attackShip.getPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* To use the litty fleet class while still maintaining encapsulation we have to create a ShipWarefare object and
|
|
||||||
* run the method from there. After the method has been run we can update the player object in this class.
|
|
||||||
* @throws Exception throws Exception so that we can use the time library to make the player if we want to.
|
|
||||||
**/
|
|
||||||
public void littyFleet() throws Exception {
|
|
||||||
ShipWarfare attackShip = new ShipWarfare(player);
|
|
||||||
attackShip.littyFleetAttack();
|
|
||||||
player = attackShip.getPlayer();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*Used to travel between different areas inside of the game world.
|
*Used to travel between different areas inside of the game world.
|
||||||
* If the player's inventory is too full it won't run.
|
* If the player's inventory is too full it won't run.
|
||||||
|
|||||||
Reference in New Issue
Block a user