diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 57516224..43809238 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -25,7 +25,7 @@ public enum ForgeManager implements Runnable { FORGE_MANAGER; - private static final BlockingQueue oven = new DelayQueue<>(); + private static final BlockingQueue forge = new DelayQueue<>(); public static final AtomicInteger wordOrderCounter = new AtomicInteger(0); public static final HashMap workOrderMap = new HashMap(); @@ -35,7 +35,7 @@ public enum ForgeManager implements Runnable { while (true) { try { - WorkOrder workOrder = oven.take(); + WorkOrder workOrder = forge.take(); // Completed or canceled work orders are not re-enqueued @@ -52,8 +52,9 @@ public enum ForgeManager implements Runnable { Logger.info("workOrder has completed: " + workOrder.workOrderID); - // Persist current items that are cooking - // after removing the negative id item from all collections. + // Persist current items that are currently building for this + // worker after first removing the negative id item from all + // collections. // Add new item to the vendors inventory @@ -67,7 +68,7 @@ public enum ForgeManager implements Runnable { // until all items for this workOrder are completed. workOrder.completionTime = System.currentTimeMillis() + workOrder.rollingDuration; - oven.add(workOrder); + forge.add(workOrder); Logger.info(workOrder.toString()); } catch (InterruptedException e) { @@ -109,7 +110,7 @@ public enum ForgeManager implements Runnable { Logger.info(workOrder.toString()); workOrder.vendor.workOrders.add(workOrder); - oven.add(workOrder); + forge.add(workOrder); } public static boolean validate(PlayerCharacter playerCharacter, WorkOrder workOrder) {