Package cz.matfyz.aai.fantom.message

Examples of cz.matfyz.aai.fantom.message.ClientType


      }
    }

    // Inform the phantom.
    logger.debug("Sending phantom information about movement of the detectives");
    ClientType winner = null;
    // If this is the last round, the phantom escaped and won the game
    if(round == graph.getGameLength()) {
      logger.info("Detectives did not catch the phantoms, phantoms won the game");
      winner = ClientType.PHANTOM;
      return new MessageUpdate(graph, detectiveMoves.getMoves(), winner);
View Full Code Here


    if(winner.getMoves().length == 0) {
      detectiveMsg = winner;
      phantomMsg = winner;
    }
    else {
      ClientType recipient = winner.getMoves()[0].getActor().getClientType();
      if(recipient != ClientType.DETECTIVE) {
        detectiveMsg = winner;
        phantomMsg = new MessageUpdate(graph, new ActorMove[0], winner.getWinner());
      } else {
        detectiveMsg = new MessageUpdate(graph, new ActorMove[0], winner.getWinner());
View Full Code Here

    this.clientType = type;
    this.lessRandom = lessRandom;
  }

  public static void main(String[] args) throws Exception {
    ClientType type = ClientType.valueOf(args[0]);
    boolean lessRandom = args.length > 1 && (args[1].equals("-l") || args[1].equals("--less"));
    RandomAgent agent = new RandomAgent(type, lessRandom);
   
    ClientRunner runner = new ClientRunner(agent);
    runner.run();
View Full Code Here

TOP

Related Classes of cz.matfyz.aai.fantom.message.ClientType

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.