Examples of Move


Examples of org.drools.planner.core.move.Move

        private void addTeamRotateMove(List<Move> moveList, List<Match> firstRotateList, List<Match> secondRotateList) {
            assert (firstRotateList.size() == secondRotateList.size());
            // if size is 1 then addCachedHomeAwaySwapMoves will have done it
            // if size is 2 then addDayRotation will have done it by 1 list of size 4
            if (firstRotateList.size() > 2) {
                Move rotateMove = new MultipleMatchListRotateMove(firstRotateList, secondRotateList);
                moveList.add(rotateMove);
            }
        }
View Full Code Here

Examples of org.drools.planner.core.move.Move

            int result = JOptionPane.showConfirmDialog(NQueensPanel.this.getRootPane(), messagePanel,
                    "Queen in column " + queen.getColumn().getIndex(),
                    JOptionPane.OK_CANCEL_OPTION);
            if (result == JOptionPane.OK_OPTION) {
                Row toRow = (Row) rowListField.getSelectedItem();
                Move move = new RowChangeMove(queen, toRow);
                solutionBusiness.doMove(move);
                solverAndPersistenceFrame.resetScreen();
            }
        }
View Full Code Here

Examples of org.drools.planner.core.move.Move

        return buildMoveScope(stepScope, 0, entities);
    }

    private MoveScope buildMoveScope(LocalSearchStepScope stepScope, int score, TestdataEntity... entities) {
        MoveScope moveScope = new MoveScope(stepScope);
        Move move = mock(Move.class);
        when(move.getPlanningEntities()).thenReturn((Collection) Arrays.asList(entities));
        moveScope.setMove(move);
        moveScope.setScore(new DefaultSimpleScore(score));
        return moveScope;
    }
View Full Code Here

Examples of org.freerealm.property.Move

        xml.append("</Move>");
        return xml.toString();
    }

    public Move initializeFromNode(Realm realm, Node node) {
        Move move = new Move();
        int points = Integer.parseInt(node.getAttributes().getNamedItem("points").getNodeValue());
        move.setPoints(points);
        for (Node subNode = node.getFirstChild(); subNode != null; subNode = subNode.getNextSibling()) {
            if (subNode.getNodeType() == Node.ELEMENT_NODE) {
                if (subNode.getNodeName().equals("TileType")) {
                    String tileTypeNameValue = subNode.getFirstChild().getNodeValue();
                    TileType tileType = realm.getTileTypeManager().getTileType(tileTypeNameValue);
                    move.addTileType(tileType);
                }
            }
        }
        return move;
    }
View Full Code Here

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

      StateMachine theMachine = getStateMachine();
    long start = System.currentTimeMillis();
    long finishBy = timeout - 1000;

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

    // Shuffle the moves into a random order, so that when we find the first
    // move that doesn't give our opponent a forced win, we aren't always choosing
    // the first legal move over and over (which is visibly repetitive).
    List<Move> movesInRandomOrder = new ArrayList<Move>();
    while(!moves.isEmpty()) {
        Move aMove = moves.get(theRandom.nextInt(moves.size()));
        movesInRandomOrder.add(aMove);
        moves.remove(aMove);
    }

    // Go through all of the legal moves in a random over, and consider each one.
View Full Code Here

Examples of org.glite.authz.pap.ui.cli.policymanagement.Move

        policyMgmtCommandList.add(new AddPoliciesFromFile());
        policyMgmtCommandList.add(new UpdatePolicy());
        policyMgmtCommandList.add(new RemovePolicies());
        policyMgmtCommandList.add(new RemoveAllPolicies());
        policyMgmtCommandList.add(new ListPolicies());
        policyMgmtCommandList.add(new Move());
        policyMgmtCommandList.add(new AddObligation());
        policyMgmtCommandList.add(new RemoveObligation());

        // PAP Management
        papMgmtCommandList.add(new Ping());
View Full Code Here

Examples of org.gridkit.jvmtool.heapdump.PathStep.Move

                if (chain[i] instanceof TypeFilterStep) {
                    continue;
                }
                sb.append("(" + shortName(o.getJavaClass().getName()) + ")");
                try {
                Move m = chain[i].track(o).next();
                sb.append(m.pathSpec);
                o = m.instance;
            }
                catch(NoSuchElementException e) {
                    sb.append("{failed: " + chain[i] + "}");
View Full Code Here

Examples of org.jpokemon.pokemon.move.Move

      json.put("action", "selectmove");
      json.put("pokemon", pokemon.name());

      for (int i = 0; i < pokemon.moveCount(); i++) {
        JSONObject moveJson = new JSONObject();
        Move move = pokemon.move(i);

        moveJson.put("name", move.name());
        moveJson.put("pp", move.pp());
        moveJson.put("ppMax", move.ppMax());

        moves.add(moveJson);
      }

      json.put("moves", new JSONArray(moves.toString()));
View Full Code Here

Examples of org.kaminoite.ranka.kido.ipad.tools.go.specification.Move

            print(property + getPointList(marked));
    }

    private void printNode(ConstNode node, boolean isRoot)
    {
        Move move = node.getMove();
        if (! isRoot)
        {
            if (move != null)
            {
                int moveNumber = getMoveNumberInVariation(node);
                if (moveNumber != 1 && moveNumber % 10 == 1)
                    printNewLine();
            }
            print(";");
        }
        ConstGameInfo info = node.getGameInfoConst();
        if (info != null)
            printGameInfo(info);
        if (move != null)
        {
            String point = getPointValue(move.getPoint());
            if (move.getColor() == BLACK)
                print("B" + point);
            else
                print("W" + point);
        }
        for (GoColor c : BLACK_WHITE_EMPTY)
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.move.Move

        phaseEnded(phaseScope);
    }

    private void doStep(ConstructionHeuristicStepScope stepScope) {
        ConstructionHeuristicPhaseScope phaseScope = stepScope.getPhaseScope();
        Move nextStep = stepScope.getStep();
        nextStep.doMove(stepScope.getScoreDirector());
        // there is no need to recalculate the score, but we still need to set it
        phaseScope.getWorkingSolution().setScore(stepScope.getScore());
        if (assertStepScoreFromScratch) {
            phaseScope.assertWorkingScoreFromScratch(stepScope.getScore(), nextStep);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.