public void msgHereIsMoney(Customer c, double amount) { // from customer
   log.add(new LoggedEvent("Received msgHereIsMoney"));
   AlertLog.getInstance().logMessage(AlertTag.MARKET, name, "Received payment from customer");
   customer = c;
   amt = amount;
   state = State.rcvdPayment;
   stateChanged();
 }
 public void msgHereIsBill(Customer c, double amount) { // from worker
   log.add(new LoggedEvent("Received msgHereIsBill"));
   print("rcvd bill");
   marketBills.add(new Bill(c, amount));
   stateChanged();
 }
 public void msgLeft(ResidentAgent ra) { // from renter
   log.add(new LoggedEvent("Left"));
   for (Renter r : renters) {
     if (r.agent == ra) r.person.msgDoneLeaving();
   }
 }
 public void msgIAmHome(PersonAgent rp, Map<String, Integer> items) { // from person
   log.add(new LoggedEvent("Home"));
   for (Renter r : renters) {
     if (r.person == rp) r.agent.msgHome(items);
   }
 }
 public void msgFinishedMaintenance(ResidentAgent ra) { // from renter
   log.add(new LoggedEvent("Finished maintenance"));
   for (Renter r : renters) {
     if (r.agent == ra) r.person.msgFinishedMaintenance();
   }
 }
 public void msgFoodDone(ResidentAgent ra, boolean success) { // from renter
   log.add(new LoggedEvent("Food done"));
   for (Renter r : renters) {
     if (r.agent == ra) r.person.msgFoodDone(success);
   }
 }
 public void msgRentDue() { // from timer
   log.add(new LoggedEvent("Rent is due"));
   for (Renter r : renters) {
     r.person.msgRentIsDue(rentAmt);
   }
 }
 public void msgEntered(ResidentAgent ra) { // from renter
   log.add(new LoggedEvent("Entered"));
   for (Renter r : renters) {
     if (r.agent == ra) r.person.msgDoneEntering();
   }
 }
 public void msgDoMaintenance(PersonAgent rp) { // from person
   log.add(new LoggedEvent("Do maintenance"));
   for (Renter r : renters) {
     if (r.person == rp) r.agent.msgDoMaintenance();
   }
 }
 public void msgIAmLeaving(PersonAgent rp) { // from person
   log.add(new LoggedEvent("Leaving"));
   for (Renter r : renters) {
     if (r.person == rp) r.agent.msgLeave();
   }
 }
 public void msgGoToBed(PersonAgent rp) { // from person
   log.add(new LoggedEvent("Go to bed"));
   for (Renter r : renters) {
     if (r.person == rp) r.agent.msgToBed();
   }
 }
 public void msgHereIsRent(PersonAgent rp, double amt) { // from person
   log.add(new LoggedEvent("Here is rent"));
   if (ownerPerson != null) ownerPerson.msgHereIsRent(amt);
 }
 public void msgPrepareToCookAtHome(PersonAgent rp, String choice) { // from person
   log.add(new LoggedEvent("Cooking"));
   for (Renter r : renters) {
     if (r.person == rp) r.agent.msgCookFood(choice);
   }
 }