Package driftingdroids.model

Examples of driftingdroids.model.Move


            this.appendSolutionText(MessageFormat.format(L10N.getString("msg.Hint.4.pattern"), numMoves, numRobots) + " ", null);
            for (Integer robot : robotsMoved) {
                this.appendSolutionText(Board.getColorShortL10N(robot.intValue()), COL_ROBOT[robot.intValue()]);
            }
            this.appendSolutionText(L10N.getString("msg.Hint.4.LastMove.text") + " ", null);
            final Move lastMove = this.computedSolutionList.get(this.computedSolutionIndex).getLastMove();
            this.appendSolutionText(Board.getColorShortL10N(lastMove.robotNumber), COL_ROBOT[lastMove.robotNumber]);
            this.appendSolutionText(lastMove.strDirectionL10N() + ".\n", null);
        }
        ++this.hintCounter;
    }
View Full Code Here


            }
        }
    }
   
    private void showNextMove(final boolean doPrint) {
        final Move step = this.computedSolutionList.get(this.computedSolutionIndex).getNextMove();
        if (null != step) {
            this.moves.add(step);
            this.currentPosition[step.robotNumber] = step.newPosition;
            this.showMove(step, doPrint);
            if (doPrint) {
                if (step.equals(this.computedSolutionList.get(this.computedSolutionIndex).getLastMove())) {
                    showSolutionShort(this.computedSolutionList.get(this.computedSolutionIndex));
                }
            }
        }
    }
View Full Code Here

                }
            }
        }
    }
    private void showPrevMove(final boolean doPrint) {
        final Move step = this.computedSolutionList.get(this.computedSolutionIndex).getPrevMove();
        if (null != step) {
            this.moves.remove(step);
            this.currentPosition[step.robotNumber] = step.oldPosition;
            this.showMove(step, doPrint);
        }
View Full Code Here

    }
   
    private void showSolutionShort(final Solution solution) {
        solution.resetMoves();
        int robot = -1;
        Move move;
        while (null != (move = solution.getNextMove())) {
            if (robot != move.robotNumber) {
                this.appendSolutionText("\n", null);
                this.appendSolutionText(Board.getColorLongL10N(move.robotNumber), COL_ROBOT[move.robotNumber]);
                this.appendSolutionText(":", null);
                robot = move.robotNumber;
            }
            this.appendSolutionText(" " + move.strDirectionL10N(), null);
        }
        this.appendSolutionText("\n", null);
    }
View Full Code Here

            this.appendSolutionText(MessageFormat.format(L10N.getString("msg.Hint.4.pattern"), numMoves, numRobots) + " ", null);
            for (Integer robot : robotsMoved) {
                this.appendSolutionText(Board.getColorShortL10N(robot.intValue()), COL_ROBOT[robot.intValue()]);
            }
            this.appendSolutionText(L10N.getString("msg.Hint.4.LastMove.text") + " ", null);
            final Move lastMove = this.computedSolutionList.get(this.computedSolutionIndex).getLastMove();
            this.appendSolutionText(Board.getColorShortL10N(lastMove.robotNumber), COL_ROBOT[lastMove.robotNumber]);
            this.appendSolutionText(lastMove.strDirectionL10N() + ".\n", null);
        }
        ++this.hintCounter;
    }
View Full Code Here

            }
        }
    }
   
    private void showNextMove(final boolean doPrint) {
        final Move step = this.computedSolutionList.get(this.computedSolutionIndex).getNextMove();
        if (null != step) {
            this.moves.add(step);
            this.currentPosition[step.robotNumber] = step.newPosition;
            this.showMove(step, doPrint);
            if (doPrint) {
                if (step.equals(this.computedSolutionList.get(this.computedSolutionIndex).getLastMove())) {
                    showSolutionShort(this.computedSolutionList.get(this.computedSolutionIndex));
                }
            }
        }
    }
View Full Code Here

                }
            }
        }
    }
    private void showPrevMove(final boolean doPrint) {
        final Move step = this.computedSolutionList.get(this.computedSolutionIndex).getPrevMove();
        if (null != step) {
            this.moves.remove(step);
            this.currentPosition[step.robotNumber] = step.oldPosition;
            this.showMove(step, doPrint);
        }
View Full Code Here

    }
   
    private void showSolutionShort(final Solution solution) {
        solution.resetMoves();
        int robot = -1;
        Move move;
        while (null != (move = solution.getNextMove())) {
            if (robot != move.robotNumber) {
                this.appendSolutionText("\n", null);
                this.appendSolutionText(Board.getColorLongL10N(move.robotNumber), COL_ROBOT[move.robotNumber]);
                this.appendSolutionText(":", null);
                robot = move.robotNumber;
            }
            this.appendSolutionText(" " + move.strDirectionL10N(), null);
        }
        this.appendSolutionText("\n", null);
    }
View Full Code Here

            this.appendSolutionText(MessageFormat.format(L10N.getString("msg.Hint.4.pattern"), numMoves, numRobots) + " ", null);
            for (Integer robot : robotsMoved) {
                this.appendSolutionText(Board.getColorShortL10N(robot.intValue()), COL_ROBOT[robot.intValue()]);
            }
            this.appendSolutionText(L10N.getString("msg.Hint.4.LastMove.text") + " ", null);
            final Move lastMove = this.computedSolutionList.get(this.computedSolutionIndex).getLastMove();
            this.appendSolutionText(Board.getColorShortL10N(lastMove.robotNumber), COL_ROBOT[lastMove.robotNumber]);
            this.appendSolutionText(lastMove.strDirectionL10N() + ".\n", null);
        }
        ++this.hintCounter;
    }
View Full Code Here

            }
        }
    }
   
    private void showNextMove(final boolean doPrint) {
        final Move step = this.computedSolutionList.get(this.computedSolutionIndex).getNextMove();
        if (null != step) {
            this.moves.add(step);
            this.currentPosition[step.robotNumber] = step.newPosition;
            this.showMove(step, doPrint);
        }
View Full Code Here

TOP

Related Classes of driftingdroids.model.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.