protected void leaveHome() {
   currentBuilding = cityData.buildings.get(home.buildingNumber);
   if (personGui.isInBedroom()) {
     personGui.DoAlmostWall();
     try {
       isMoving.acquire();
     } catch (InterruptedException e) {
       //   Auto-generated catch block
       e.printStackTrace();
     }
     personGui.DoGoToWall();
     try {
       isMoving.acquire();
     } catch (InterruptedException e) {
       //   Auto-generated catch block
       e.printStackTrace();
     }
   }
   if (home instanceof Home) {
     personGui.DoGoToEntrance();
     atEntrance.drainPermits();
     try {
       atEntrance.acquire();
     } catch (InterruptedException e) {
       //   Auto-generated catch block
       e.printStackTrace();
     }
     personGui.DoLeaveBuilding();
     currentBuilding.LeaveBuilding(this);
   }
   if (home instanceof Apartment) {
     Apartment a = (Apartment) home;
     personGui.DoGoToEntrance();
     try {
       isMoving.acquire();
     } catch (InterruptedException e1) {
       //   Auto-generated catch block
       e1.printStackTrace();
     }
     a.rooms.get(roomNumber).LeaveBuilding(this);
     personGui.DoGoToHallway();
     try {
       isMoving.acquire();
     } catch (InterruptedException e) {
       //   Auto-generated catch block
       e.printStackTrace();
     }
     personGui.DoLeaveBuilding();
     a.LeaveBuilding(this);
   }
   bigState = BigState.doingNothing;
 }