Package org.ggp.base.util.statemachine

Examples of org.ggp.base.util.statemachine.Move


  public List<Move> toMoves(Set<GdlSentence> results)
  {
    List<Move> moves = new ArrayList<Move>();
    for (GdlSentence result : results)
    {
      moves.add(new Move(result.get(1)));
    }

    return moves;
  }
View Full Code Here


  public Move stateMachineSelectMove(long timeout) throws TransitionDefinitionException, MoveDefinitionException, GoalDefinitionException
  {
    long start = System.currentTimeMillis();

    List<Move> moves = getStateMachine().getLegalMoves(getCurrentState(), getRole());
    Move selection = (moves.get(new Random().nextInt(moves.size())));

    long stop = System.currentTimeMillis();

    notifyObservers(new GamerSelectedMoveEvent(moves, selection, stop - start));
    return selection;
View Full Code Here

TOP

Related Classes of org.ggp.base.util.statemachine.Move

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.