Package pl.michalostruszka.gameoflife.cell

Examples of pl.michalostruszka.gameoflife.cell.Position


    private static Set<Position> currentCellNeighbours() {
        Set<Position> expectedNeighbours = new HashSet<Position>();
        int[][] neighboursRelativeCoords = {{0, 1}, {1, 1}, {1, 0}, {1, -1}, {0, -1}, {-1, -1}, {-1, 0}, {-1, 1}};
        for (int[] coords : neighboursRelativeCoords) {
            expectedNeighbours.add(new Position(coords[0], coords[1]));
        }
        return expectedNeighbours;
    }
View Full Code Here

TOP

Related Classes of pl.michalostruszka.gameoflife.cell.Position

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.