Package com.github.axet.starjeweled.common

Examples of com.github.axet.starjeweled.common.MatrixPoint


        if (wasCross && !wasErased)
            return;

        if (!mm.get(mm.p1).equals(mm.seqTitle)) {
            MatrixPoint p = mm.p1;
            mm.p1 = mm.p2;
            mm.p2 = p;
        }

        best.add(mm);
View Full Code Here


    public ArrayList<MoveMatrix> getMove() {
        ArrayList<MoveMatrix> bestMove = new ArrayList<MoveMatrix>();

        for (int y = 0; y < m.cy; y++) {
            for (int x = 0; x < m.cx; x++) {
                MatrixPoint p1 = new MatrixPoint(x, y);
                MatrixPoint p2 = new MatrixPoint(x - 1, y);
                MoveMatrix m1 = new MoveMatrix(m, p1, p2);
                addBest(bestMove, m1);

                MatrixPoint p22 = new MatrixPoint(x + 1, y);
                MoveMatrix m2 = new MoveMatrix(m, p1, p22);
                addBest(bestMove, m2);

                MatrixPoint p23 = new MatrixPoint(x, y - 1);
                MoveMatrix m3 = new MoveMatrix(m, p1, p23);
                addBest(bestMove, m3);

                MatrixPoint p24 = new MatrixPoint(x, y + 1);
                MoveMatrix m4 = new MoveMatrix(m, p1, p24);
                addBest(bestMove, m4);
            }
        }
View Full Code Here

        for (int y = 0; y < m.cy; y++) {
            for (int x = 0; x < m.cx; x++) {
                String s = m.get(x, y);
                RangeColor r = colors.getColor(s);
                if (r == null) {
                    setColor(new MatrixPoint(x, y), Color.BLACK.getRGB());
                } else {
                    setColor(new MatrixPoint(x, y), r.average());
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.github.axet.starjeweled.common.MatrixPoint

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.