private void addOppositeHints(PuzzleSolverSideTile[] groupA, PuzzleSolverSideTile[] groupB) { //each PuzzleSolverSideTile is given the tile on the opposite side of its street to it //the opposite hint for the leftmost tile in the top row is the leftmost tile in the bottom row for (int i = 0; i < size; i++) { PuzzleSolverSideTile a = groupA[i]; PuzzleSolverSideTile b = groupB[i]; a.oppositeHint = b; b.oppositeHint = a; } }
private PuzzleSolverSideTile[] createHintTiles(int[] values) { //creates the set of PuzzleSolverSideTiles, and populates them with the provided values PuzzleSolverSideTile[] hintTiles = new PuzzleSolverSideTile[size]; for (int i = 0; i < size; i++) { int value = values[i]; hintTiles[i] = new PuzzleSolverSideTile(); hintTiles[i].hint = value; hintTiles[i].row = new PuzzleSolverTile[size]; } return(hintTiles); }