Package ise.mace.inputs

Examples of ise.mace.inputs.LeaveNotification


      return;
    }

    if (input.getClass().equals(LeaveNotification.class))
    {
      final LeaveNotification in = (LeaveNotification)input;

      dm.removeMember(in.getAgent());
      this.onMemberLeave(in.getAgent(), in.getReason());
      //Bug fix
      ec.act(new RespondToApplication(in.getAgent(), false), this.getId(),
              authCode);
      //Bug fix end
      logger.log(Level.FINE, "{0} lost memeber {1} because of {2}", new Object[]
              {
                dm.getName(),
                ec.nameof(in.getAgent()), in.getReason()
              });

      if (dm.getMemberList().isEmpty())
      {
        ec.act(new Death(), dm.getId(), authCode);
      }
      return;
    }

    if (input.getClass().equals(HuntResult.class))
    {
      final HuntResult in = (HuntResult)input;
      huntResult.put(in.getAgent(), in.getFoodHunted());
      logger.log(Level.FINE, "Agent {0} has hunted food worth {1} for {2}",
              new Object[]
              {
                ec.nameof(in.getAgent()),
                in.getFoodHunted(), dm.getName()
              });
      return;
    }

    if (input.getClass().equals(Vote.class))
View Full Code Here


      {
        String old_group = dmodel.getAgentById(actorID).getGroupId();

        if (old_group != null)
        {
          sim.getPlayer(old_group).enqueueInput(new LeaveNotification(
                  sim.getTime(), LeaveNotification.Reasons.Other, actorID));
        }
        logger.log(Level.FINE, "Agent {0} has rejoined the free agents group.",
                nameOf(actorID));
      }
View Full Code Here

      {
        String group = dmodel.getAgentById(actorID).getGroupId();
        if (group != null)
        {
          sim.getPlayer(group).enqueueInput(
                  new LeaveNotification(dmodel.time,
                  LeaveNotification.Reasons.Death, actorID));
        }
        logger.log(Level.FINE,
                "Agent {0} has died. So long, and thanks for all the fish.",
                nameOf(actorID));
View Full Code Here

      if (application.wasAccepted())
      {
        String old_group = dmodel.getAgentById(application.getAgent()).getGroupId();
        if (old_group != null)
        {
          sim.getPlayer(old_group).enqueueInput(new LeaveNotification(
                  sim.getTime(), LeaveNotification.Reasons.Other,
                  application.getAgent()));
        }
      }
      logger.log(Level.FINE,
View Full Code Here

TOP

Related Classes of ise.mace.inputs.LeaveNotification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.