Warehouse and Travel events are still work in progress but added their code to the github repo

This commit is contained in:
2019-03-24 19:11:54 -06:00
parent 68f2c345d9
commit 566cc9dfb2
4 changed files with 452 additions and 566 deletions

View File

@@ -50,7 +50,6 @@ public class TravelGUI extends Player{
*/
public TravelGUI(Player player) {
Player playerDummy = new Player(player);
this.shop = new TaipanShopGUI(player);
setPlayer(playerDummy);
}
@@ -184,9 +183,18 @@ public class TravelGUI extends Player{
stage.show();
}
else if(shopScene){
TaipanShopGUI shop = new TaipanShopGUI(getPlayer());
shop.initializeShop(stage);
stage.show();
Random rand = new Random();
int randGenNum = rand.nextInt(3) + 1;
if(randGenNum >= 2) {
TaipanShopGUI shop = new TaipanShopGUI(getPlayer());
shop.initializeShop(stage);
stage.show();
}
else {
RandomEventGUI randomEventGUI = new RandomEventGUI(getPlayer());
randomEventGUI.initializeRandomEventGUI(stage);
stage.show();
}
}
});