Package org.ggp.base.player.gamer.statemachine.random

Examples of org.ggp.base.player.gamer.statemachine.random.RandomGamer


      System.err.println("Usage: GamePlayer <port>");
      System.exit(1);
    }

    try {
      GamePlayer player = new GamePlayer(Integer.valueOf(args[0]), new RandomGamer());
      player.run();
    } catch (NumberFormatException e) {
      System.err.println("Illegal port number: " + args[0]);
      e.printStackTrace();
      System.exit(2);
View Full Code Here


  public ProxyGamePlayer(int port, Class<? extends Gamer> gamer) throws IOException
  {
      // Use a random gamer as our "default" gamer, that we fall back to
      // in the event that we don't get a message from the client, or if
      // we need to handle a simple request (START or STOP).
      theDefaultGamer = new RandomGamer();

    observers = new ArrayList<Observer>();
    listener = null;
    while (listener == null) {
      try {
View Full Code Here

                  }

                  theClientManager = new ClientManager(Thread.currentThread());
                  theClientManager.start();

                  theDefaultGamer = new RandomGamer();
                  GdlPool.drainPool();
                  SymbolPool.drainPool();

                    long usedMemory = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
                    double usedMemoryInMegs = usedMemory / 1024.0 / 1024.0;
View Full Code Here

          long receptionTime = theMessage.receptionTime;
        notifyObservers(new PlayerReceivedMessageEvent(in));

        Request request = new RequestFactory().create(gamer, in);
        if(request instanceof StartRequest) {
            RandomGamer theDefaultGamer = new RandomGamer();
            new RequestFactory().create(theDefaultGamer, in).process(1);
            GamerLogger.startFileLogging(theDefaultGamer.getMatch(), theDefaultGamer.getRoleName().toString());
            GamerLogger.log("Proxy", "[ProxyClient] Got message: " + theMessage);
        }
        String out = request.process(receptionTime);

        ProxyMessage outMessage = new ProxyMessage("DONE:" + out, theCode, 0L);
View Full Code Here

TOP

Related Classes of org.ggp.base.player.gamer.statemachine.random.RandomGamer

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.