From 2e0ffe67fa2ca880011aa088eb2f0283a0008d67 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 17 Mar 2024 12:26:57 -0400 Subject: [PATCH] Overdraft method written --- src/engine/objects/Warehouse.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/objects/Warehouse.java b/src/engine/objects/Warehouse.java index 39d2c064..96598582 100644 --- a/src/engine/objects/Warehouse.java +++ b/src/engine/objects/Warehouse.java @@ -69,7 +69,9 @@ public class Warehouse { } - public static HashMap calculateWarehouseOverdraft(Warehouse warehouse, HashMap costMap) { + public static HashMap + calculateWarehouseOverdraft(Warehouse warehouse, HashMap costMap) { + HashMap overdraft = new HashMap<>(); for (Enum.ResourceType resourceType : costMap.keySet()) { @@ -112,7 +114,7 @@ public class Warehouse { return; - if (!deposit(player, resource, depositAmount, true, true,warehouse)) { + if (!deposit(player, resource, depositAmount, true, true, warehouse)) { return; } @@ -144,7 +146,6 @@ public class Warehouse { if (city == null) return; - ; warehouse = city.warehouse; @@ -190,7 +191,6 @@ public class Warehouse { if (city == null) return; - ; warehouse = city.warehouse;