bunch of revisions, still in progress

This commit is contained in:
Vikram
2019-02-24 16:53:45 -07:00
parent 210f64cb2f
commit 0f20b9a8ec
6 changed files with 552 additions and 346 deletions

View File

@@ -5,7 +5,7 @@ public class Travel {
private Player player;
public void Player(Player player) {
public void setPlayer(Player player) {
Player playerDummy = new Player(player);
this.player = playerDummy;
}
@@ -54,11 +54,10 @@ public class Travel {
}
private void randomEventSea(int locationOfTravel) throws Exception {
ShipWarfare attackShip = new ShipWarfare(player);
Random rand = new Random();
int randGenNum = rand.nextInt(3) + 1;
if (randGenNum == 1) {
attackShip.peasantFleetAttack();
peasantFleet();
} else if (randGenNum == 2) {
disaster(locationOfTravel);
}
@@ -83,6 +82,12 @@ public class Travel {
}
}
public void peasantFleet() throws Exception {
ShipWarfare attackShip = new ShipWarfare(player);
attackShip.peasantFleetAttack();
player = attackShip.getPlayer();
}
public void travelTo() {
Scanner keyboard = new Scanner(System.in);
String response;