Examples of MoveMatrix


Examples of com.github.axet.starjeweled.common.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);
            }
        }

        if (bestMove.size() == 0)
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.