예제 #1
0
 /**
  * Get the date of delivery of one contract.
  *
  * @return the integer of date of delivery
  * @param contract: the contract that need to get delivery date.
  */
 public int getDeliveryDate(Contract contract) {
   World world = WorldManager.getInstance().getWorld();
   int currentDay = world.getTimeManager().getDays();
   int startDay = currentContracts.get(contract);
   int interval = contract.getInterval();
   return (startDay + interval) - currentDay;
 }