From 85b2043ebf35d59501834f8d26b59e91ea86a218 Mon Sep 17 00:00:00 2001 From: Vikramb987 <47336882+Vikramb987@users.noreply.github.com> Date: Mon, 25 Mar 2019 12:14:34 -0600 Subject: [PATCH 1/4] Update TaipanShopGUI.java fixed some formatting --- src/TaipanShopGUI.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/TaipanShopGUI.java b/src/TaipanShopGUI.java index 74017f5..5dedce7 100644 --- a/src/TaipanShopGUI.java +++ b/src/TaipanShopGUI.java @@ -690,11 +690,13 @@ public class TaipanShopGUI extends Player{ locationText.setFont(size14); inventoryText.setAlignment(Pos.CENTER); + inventoryText.setPrefWidth(100.0); + inventoryText.setPrefHeight(108.0); inventoryText.setFont(size14); inventoryHeldText.setAlignment(Pos.CENTER); inventoryHeldText.setPrefHeight(108.0); - inventoryHeldText.setPrefWidth(100.0); + inventoryHeldText.setPrefWidth(90.0); inventoryHeldText.setFont(size14); gunsText.setPrefHeight(108.0); From c008a6816662c13f75c5de4e7815ebbb7f318087 Mon Sep 17 00:00:00 2001 From: Vikramb987 <47336882+Vikramb987@users.noreply.github.com> Date: Mon, 25 Mar 2019 12:18:11 -0600 Subject: [PATCH 2/4] Update TaipanShopGUI.java epic final changes boi --- src/TaipanShopGUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TaipanShopGUI.java b/src/TaipanShopGUI.java index 5dedce7..9f05891 100644 --- a/src/TaipanShopGUI.java +++ b/src/TaipanShopGUI.java @@ -696,7 +696,7 @@ public class TaipanShopGUI extends Player{ inventoryHeldText.setAlignment(Pos.CENTER); inventoryHeldText.setPrefHeight(108.0); - inventoryHeldText.setPrefWidth(90.0); + inventoryHeldText.setPrefWidth(100.0); inventoryHeldText.setFont(size14); gunsText.setPrefHeight(108.0); From 3ac1087741b79df476537b895774035ed51029de Mon Sep 17 00:00:00 2001 From: Vikramb987 <47336882+Vikramb987@users.noreply.github.com> Date: Mon, 25 Mar 2019 12:19:05 -0600 Subject: [PATCH 3/4] Update TravelGUI.java epicchanges --- src/TravelGUI.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/TravelGUI.java b/src/TravelGUI.java index da78eeb..8588a14 100644 --- a/src/TravelGUI.java +++ b/src/TravelGUI.java @@ -280,6 +280,8 @@ public class TravelGUI extends Player{ locationText.setFont(size14); inventoryText.setAlignment(Pos.CENTER); + inventoryText.setPrefWidth(100.0); + inventoryText.setPrefHeight(108.0); inventoryText.setFont(size14); inventoryHeldText.setAlignment(Pos.CENTER); @@ -499,6 +501,6 @@ public class TravelGUI extends Player{ inventoryHeldText.setText(String.format("\n %d\n %d\n %d\n %d", getOpiumHeld(), getSilkHeld(), getArmsHeld(), getGeneralHeld())); shipStatusText.setText(String.format("\tDebt\n\t%d\n\n\tShip status\n\t%s: %d", getDebt(), shipStatusString(), getHP())); cashText.setText(String.format(" Cash: $%,d", getMoney())); - bankText.setText(String.format("Bank: %d", getBank())); + bankText.setText(String.format("Bank: $%,d", getBank())); } } From 6e43912b2eca7d6a940195655c187b31244aadea Mon Sep 17 00:00:00 2001 From: Vikramb987 <47336882+Vikramb987@users.noreply.github.com> Date: Mon, 25 Mar 2019 12:25:59 -0600 Subject: [PATCH 4/4] Update ShipWarfareGUI.java fixed error with terminal --- src/ShipWarfareGUI.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ShipWarfareGUI.java b/src/ShipWarfareGUI.java index f1839fa..a322700 100644 --- a/src/ShipWarfareGUI.java +++ b/src/ShipWarfareGUI.java @@ -16,6 +16,7 @@ import javafx.stage.Stage; import javafx.util.Duration; import java.io.FileInputStream; import java.util.Random; +import java.util.concurrent.ExecutionException; /** * 2019-03-10 (Edited on 2019-03-23) @@ -445,8 +446,17 @@ public class ShipWarfareGUI extends Player { centeringUserShipPane.setPrefHeight(200.0); centeringUserShipPane.setPrefWidth(200.0); - Image ourShip = new Image(new FileInputStream("src/images/ourShip.png")); - Image enemyShip = new Image(new FileInputStream("src/images/enemyShip.png")); + Image ourShip; + Image enemyShip; + + try { + ourShip = new Image(new FileInputStream("src/images/ourShip.png")); + enemyShip = new Image(new FileInputStream("src/images/enemyShip.png")); + + }catch(Exception e){ + ourShip = new Image(new FileInputStream("images/ourShip.png")); + enemyShip = new Image(new FileInputStream("images/enemyShip.png")); + } //Setting the image view