Browse Source

Overdraft method written

combat-2
MagicBot 8 months ago
parent
commit
2e0ffe67fa
  1. 6
      src/engine/objects/Warehouse.java

6
src/engine/objects/Warehouse.java

@ -69,7 +69,9 @@ public class Warehouse {
} }
public static HashMap<Enum.ResourceType, Integer> calculateWarehouseOverdraft(Warehouse warehouse, HashMap<Enum.ResourceType, Integer> costMap) { public static HashMap<Enum.ResourceType, Integer>
calculateWarehouseOverdraft(Warehouse warehouse, HashMap<Enum.ResourceType, Integer> costMap) {
HashMap<Enum.ResourceType, Integer> overdraft = new HashMap<>(); HashMap<Enum.ResourceType, Integer> overdraft = new HashMap<>();
for (Enum.ResourceType resourceType : costMap.keySet()) { for (Enum.ResourceType resourceType : costMap.keySet()) {
@ -144,7 +146,6 @@ public class Warehouse {
if (city == null) if (city == null)
return; return;
;
warehouse = city.warehouse; warehouse = city.warehouse;
@ -190,7 +191,6 @@ public class Warehouse {
if (city == null) if (city == null)
return; return;
;
warehouse = city.warehouse; warehouse = city.warehouse;

Loading…
Cancel
Save