Skyscraper puzzle solver in Java
$begingroup$
For an assignment, I have created a solver for the Skyscraper Puzzle:
Each puzzle consists of an N×N grid with some clues along its sides. The object is to place a skyscraper in each square, with a height between 1 and N, so that no two skyscrapers in a row or column have the same number of floors. In addition, the number of visible skyscrapers, as viewed from the direction of each clue, is equal to the value of the clue. Note that higher skyscrapers block the view of lower skyscrapers located behind them.
The puzzle and the ordinances are hard coded into the program. I would like feedback on efficiency and readability. Any and all suggestions are welcome!
SkyscraperPuzzle.java
package Skyscraper;
/**
* Write a description of class SkyscraperPuzzle here.
*
* @author David White
* @version (a version number or a date)
*/
public class SkyscraperPuzzle {
private int puzzle = {
{1, 4, 3, 2},
{2, 3, 4, 1},
{4, 2, 1, 3},
{3, 1, 2, 4}
};
private Ordinance ords = {
{new Ordinance(3, Direction.NORTH), new Ordinance(1, Direction.NORTH), new Ordinance(2, Direction.NORTH), new Ordinance(3, Direction.NORTH)}, //NORTH
{new Ordinance(2, Direction.SOUTH), new Ordinance(4, Direction.SOUTH), new Ordinance(2, Direction.SOUTH), new Ordinance(1, Direction.SOUTH)}, //SOUTH
{new Ordinance(3, Direction.EAST), new Ordinance(2, Direction.EAST), new Ordinance(2, Direction.EAST), new Ordinance(1, Direction.EAST)}, //EAST
{new Ordinance(2, Direction.WEST), new Ordinance(3, Direction.WEST), new Ordinance(1, Direction.WEST), new Ordinance(2, Direction.WEST)} //WEST
};
/**
* Write a constructor to initialize and populate the puzzle and list of ordinances
* so that the puzzle may be checked to see if it is (correctly) solved.
*/
public SkyscraperPuzzle() {
//Puzzle is populated above
//Ords is populated above
}
/**
* returns the puzzle
*/
public int getPuzzle() {
return this.puzzle;
}
/**
* Retuns a 1D array that respresents row r of puzzle
*/
public int getRow(int row) {
return puzzle[row];
}
/**
* Write a method that returns a 1D array that represents column c of puzzle
*/
public int getColumn(int column) { // row by column
int arr = new int[this.puzzle.length];
for(int i = 0; i < this.puzzle.length; i++) {
arr[i] = this.puzzle[i][column];
}
return arr;
}
/**
* Write a method that returns true if the 1D array parameter does not contain duplicates
*/
public boolean noDuplicates(int arr) {
for(int i = 0; i < arr.length - 1; i++) {
for(int j = i + 1; j < arr.length - 1; j++) {
if(arr[i] == arr[j]) {
return false;
}
}
}
return true;
}
/**
* Write a method that returns true if each value from 1 to the number of rows (or columns, they
* are the same), is contained in the 1D array
*
* if 5x5
* then 1 2 3 4 5 should all be in array
*/
public boolean containsOneToN(int arr) {
int array = new int[arr.length];
int count = 0;
for(int i = 0; i < array.length; i++) {
array[i] = i + 1;
}
for(int i = 0; i < arr.length; i++) {
for(int j = 0; j < array.length; j++) {
if(arr[i] == array[j]) {
count += 1;
array[j] = 0;
}
}
}
return count == arr.length;
}
/**
* Write a method that traverses the 2D array, ords, and returns true if each and
* every Ordinance requirement is met
*/
public boolean meetsOrdinances() {
for(int i = 0; i < this.puzzle.length; i++) {
/* Yet to be implemented */
}
return false; //used to allow compile
}
/**
* Write a method that returns true if the puzzle is a correctly solved Skyscraper puzzle
*/
public boolean isSolved() {
/* Each row and column */
for(int i = 0; i < this.puzzle.length; i++) {
if(!noDuplicates(this.puzzle[i]) || !noDuplicates(getColumn(i))) {
return false;
}
if(!containsOneToN(this.puzzle[i]) || !containsOneToN(getColumn(i))) {
return false;
}
if(!meetsOrdinances()) {
return false;
}
}
return true;
}
}
Direction.java
package Skyscraper;
/**
* Enumeration class Direction - write a description of the enum class here
*
* @author David White
* @version (version number or date here)
*/
public enum Direction {
NORTH, /* Above the 2D array */
SOUTH, /* Below the 2D array */
EAST, /* Right of the 2D array */
WEST /* Left of the 2D array */
}
Ordinance.java
package Skyscraper;
/**
* Write a description of class Ordinance here.
*
* @author David White
* @version (a version number or a date)
*/
public class Ordinance {
private int num;
private Direction direction;
public Ordinance(int num, Direction direction) {
this.num = num;
this.direction = direction;
}
public int getNum() {
return this.num;
}
public Direction getDirection() {
return this.direction;
}
}
The PuzzleTest.java
is used to make sure the methods I've written work in the way they're intended to.
PuzzleTest.java
package Skyscraper;
/**
* Write a description of class PuzzleTest here.
*
* @author David White
* @version (a version number or a date)
*/
public class PuzzleTest {
public static void main(String args) {
SkyscraperPuzzle p = new SkyscraperPuzzle();
int puzzle = p.getPuzzle();
/*
* Outputs entire puzzle
*/
for(int row : puzzle) {
for(int item : row) {
System.out.print(item + " ");
}
System.out.println();
}
System.out.println();
/*
* Test getColumn method
* Output should be
* 1
* 4
* 7
* Status: Successful
*/
int col = p.getColumn(0);
for(int i = 0; i < col.length; i++) {
System.out.println(col[i]);
}
System.out.println();
/*
* Test noDuplicates method
* Output should be
* true
* Status: Successful
*/
int arr = {1, 2, 3, 4, 5};
System.out.println(p.noDuplicates(arr));
System.out.println();
/*
* Test containsOneToN method
* Output should be
* true
* Status: Successful
*/
int arr2 = {1, 2, 3, 4, 5};
System.out.println(p.containsOneToN(arr2));
/*
* Test meetsOrdinances method
* Output should be
* true
* Status: To be tested
*/
}
}
java homework sudoku
$endgroup$
add a comment |
$begingroup$
For an assignment, I have created a solver for the Skyscraper Puzzle:
Each puzzle consists of an N×N grid with some clues along its sides. The object is to place a skyscraper in each square, with a height between 1 and N, so that no two skyscrapers in a row or column have the same number of floors. In addition, the number of visible skyscrapers, as viewed from the direction of each clue, is equal to the value of the clue. Note that higher skyscrapers block the view of lower skyscrapers located behind them.
The puzzle and the ordinances are hard coded into the program. I would like feedback on efficiency and readability. Any and all suggestions are welcome!
SkyscraperPuzzle.java
package Skyscraper;
/**
* Write a description of class SkyscraperPuzzle here.
*
* @author David White
* @version (a version number or a date)
*/
public class SkyscraperPuzzle {
private int puzzle = {
{1, 4, 3, 2},
{2, 3, 4, 1},
{4, 2, 1, 3},
{3, 1, 2, 4}
};
private Ordinance ords = {
{new Ordinance(3, Direction.NORTH), new Ordinance(1, Direction.NORTH), new Ordinance(2, Direction.NORTH), new Ordinance(3, Direction.NORTH)}, //NORTH
{new Ordinance(2, Direction.SOUTH), new Ordinance(4, Direction.SOUTH), new Ordinance(2, Direction.SOUTH), new Ordinance(1, Direction.SOUTH)}, //SOUTH
{new Ordinance(3, Direction.EAST), new Ordinance(2, Direction.EAST), new Ordinance(2, Direction.EAST), new Ordinance(1, Direction.EAST)}, //EAST
{new Ordinance(2, Direction.WEST), new Ordinance(3, Direction.WEST), new Ordinance(1, Direction.WEST), new Ordinance(2, Direction.WEST)} //WEST
};
/**
* Write a constructor to initialize and populate the puzzle and list of ordinances
* so that the puzzle may be checked to see if it is (correctly) solved.
*/
public SkyscraperPuzzle() {
//Puzzle is populated above
//Ords is populated above
}
/**
* returns the puzzle
*/
public int getPuzzle() {
return this.puzzle;
}
/**
* Retuns a 1D array that respresents row r of puzzle
*/
public int getRow(int row) {
return puzzle[row];
}
/**
* Write a method that returns a 1D array that represents column c of puzzle
*/
public int getColumn(int column) { // row by column
int arr = new int[this.puzzle.length];
for(int i = 0; i < this.puzzle.length; i++) {
arr[i] = this.puzzle[i][column];
}
return arr;
}
/**
* Write a method that returns true if the 1D array parameter does not contain duplicates
*/
public boolean noDuplicates(int arr) {
for(int i = 0; i < arr.length - 1; i++) {
for(int j = i + 1; j < arr.length - 1; j++) {
if(arr[i] == arr[j]) {
return false;
}
}
}
return true;
}
/**
* Write a method that returns true if each value from 1 to the number of rows (or columns, they
* are the same), is contained in the 1D array
*
* if 5x5
* then 1 2 3 4 5 should all be in array
*/
public boolean containsOneToN(int arr) {
int array = new int[arr.length];
int count = 0;
for(int i = 0; i < array.length; i++) {
array[i] = i + 1;
}
for(int i = 0; i < arr.length; i++) {
for(int j = 0; j < array.length; j++) {
if(arr[i] == array[j]) {
count += 1;
array[j] = 0;
}
}
}
return count == arr.length;
}
/**
* Write a method that traverses the 2D array, ords, and returns true if each and
* every Ordinance requirement is met
*/
public boolean meetsOrdinances() {
for(int i = 0; i < this.puzzle.length; i++) {
/* Yet to be implemented */
}
return false; //used to allow compile
}
/**
* Write a method that returns true if the puzzle is a correctly solved Skyscraper puzzle
*/
public boolean isSolved() {
/* Each row and column */
for(int i = 0; i < this.puzzle.length; i++) {
if(!noDuplicates(this.puzzle[i]) || !noDuplicates(getColumn(i))) {
return false;
}
if(!containsOneToN(this.puzzle[i]) || !containsOneToN(getColumn(i))) {
return false;
}
if(!meetsOrdinances()) {
return false;
}
}
return true;
}
}
Direction.java
package Skyscraper;
/**
* Enumeration class Direction - write a description of the enum class here
*
* @author David White
* @version (version number or date here)
*/
public enum Direction {
NORTH, /* Above the 2D array */
SOUTH, /* Below the 2D array */
EAST, /* Right of the 2D array */
WEST /* Left of the 2D array */
}
Ordinance.java
package Skyscraper;
/**
* Write a description of class Ordinance here.
*
* @author David White
* @version (a version number or a date)
*/
public class Ordinance {
private int num;
private Direction direction;
public Ordinance(int num, Direction direction) {
this.num = num;
this.direction = direction;
}
public int getNum() {
return this.num;
}
public Direction getDirection() {
return this.direction;
}
}
The PuzzleTest.java
is used to make sure the methods I've written work in the way they're intended to.
PuzzleTest.java
package Skyscraper;
/**
* Write a description of class PuzzleTest here.
*
* @author David White
* @version (a version number or a date)
*/
public class PuzzleTest {
public static void main(String args) {
SkyscraperPuzzle p = new SkyscraperPuzzle();
int puzzle = p.getPuzzle();
/*
* Outputs entire puzzle
*/
for(int row : puzzle) {
for(int item : row) {
System.out.print(item + " ");
}
System.out.println();
}
System.out.println();
/*
* Test getColumn method
* Output should be
* 1
* 4
* 7
* Status: Successful
*/
int col = p.getColumn(0);
for(int i = 0; i < col.length; i++) {
System.out.println(col[i]);
}
System.out.println();
/*
* Test noDuplicates method
* Output should be
* true
* Status: Successful
*/
int arr = {1, 2, 3, 4, 5};
System.out.println(p.noDuplicates(arr));
System.out.println();
/*
* Test containsOneToN method
* Output should be
* true
* Status: Successful
*/
int arr2 = {1, 2, 3, 4, 5};
System.out.println(p.containsOneToN(arr2));
/*
* Test meetsOrdinances method
* Output should be
* true
* Status: To be tested
*/
}
}
java homework sudoku
$endgroup$
1
$begingroup$
@200_success Yes, just edited the post to add the description.
$endgroup$
– David White
24 mins ago
add a comment |
$begingroup$
For an assignment, I have created a solver for the Skyscraper Puzzle:
Each puzzle consists of an N×N grid with some clues along its sides. The object is to place a skyscraper in each square, with a height between 1 and N, so that no two skyscrapers in a row or column have the same number of floors. In addition, the number of visible skyscrapers, as viewed from the direction of each clue, is equal to the value of the clue. Note that higher skyscrapers block the view of lower skyscrapers located behind them.
The puzzle and the ordinances are hard coded into the program. I would like feedback on efficiency and readability. Any and all suggestions are welcome!
SkyscraperPuzzle.java
package Skyscraper;
/**
* Write a description of class SkyscraperPuzzle here.
*
* @author David White
* @version (a version number or a date)
*/
public class SkyscraperPuzzle {
private int puzzle = {
{1, 4, 3, 2},
{2, 3, 4, 1},
{4, 2, 1, 3},
{3, 1, 2, 4}
};
private Ordinance ords = {
{new Ordinance(3, Direction.NORTH), new Ordinance(1, Direction.NORTH), new Ordinance(2, Direction.NORTH), new Ordinance(3, Direction.NORTH)}, //NORTH
{new Ordinance(2, Direction.SOUTH), new Ordinance(4, Direction.SOUTH), new Ordinance(2, Direction.SOUTH), new Ordinance(1, Direction.SOUTH)}, //SOUTH
{new Ordinance(3, Direction.EAST), new Ordinance(2, Direction.EAST), new Ordinance(2, Direction.EAST), new Ordinance(1, Direction.EAST)}, //EAST
{new Ordinance(2, Direction.WEST), new Ordinance(3, Direction.WEST), new Ordinance(1, Direction.WEST), new Ordinance(2, Direction.WEST)} //WEST
};
/**
* Write a constructor to initialize and populate the puzzle and list of ordinances
* so that the puzzle may be checked to see if it is (correctly) solved.
*/
public SkyscraperPuzzle() {
//Puzzle is populated above
//Ords is populated above
}
/**
* returns the puzzle
*/
public int getPuzzle() {
return this.puzzle;
}
/**
* Retuns a 1D array that respresents row r of puzzle
*/
public int getRow(int row) {
return puzzle[row];
}
/**
* Write a method that returns a 1D array that represents column c of puzzle
*/
public int getColumn(int column) { // row by column
int arr = new int[this.puzzle.length];
for(int i = 0; i < this.puzzle.length; i++) {
arr[i] = this.puzzle[i][column];
}
return arr;
}
/**
* Write a method that returns true if the 1D array parameter does not contain duplicates
*/
public boolean noDuplicates(int arr) {
for(int i = 0; i < arr.length - 1; i++) {
for(int j = i + 1; j < arr.length - 1; j++) {
if(arr[i] == arr[j]) {
return false;
}
}
}
return true;
}
/**
* Write a method that returns true if each value from 1 to the number of rows (or columns, they
* are the same), is contained in the 1D array
*
* if 5x5
* then 1 2 3 4 5 should all be in array
*/
public boolean containsOneToN(int arr) {
int array = new int[arr.length];
int count = 0;
for(int i = 0; i < array.length; i++) {
array[i] = i + 1;
}
for(int i = 0; i < arr.length; i++) {
for(int j = 0; j < array.length; j++) {
if(arr[i] == array[j]) {
count += 1;
array[j] = 0;
}
}
}
return count == arr.length;
}
/**
* Write a method that traverses the 2D array, ords, and returns true if each and
* every Ordinance requirement is met
*/
public boolean meetsOrdinances() {
for(int i = 0; i < this.puzzle.length; i++) {
/* Yet to be implemented */
}
return false; //used to allow compile
}
/**
* Write a method that returns true if the puzzle is a correctly solved Skyscraper puzzle
*/
public boolean isSolved() {
/* Each row and column */
for(int i = 0; i < this.puzzle.length; i++) {
if(!noDuplicates(this.puzzle[i]) || !noDuplicates(getColumn(i))) {
return false;
}
if(!containsOneToN(this.puzzle[i]) || !containsOneToN(getColumn(i))) {
return false;
}
if(!meetsOrdinances()) {
return false;
}
}
return true;
}
}
Direction.java
package Skyscraper;
/**
* Enumeration class Direction - write a description of the enum class here
*
* @author David White
* @version (version number or date here)
*/
public enum Direction {
NORTH, /* Above the 2D array */
SOUTH, /* Below the 2D array */
EAST, /* Right of the 2D array */
WEST /* Left of the 2D array */
}
Ordinance.java
package Skyscraper;
/**
* Write a description of class Ordinance here.
*
* @author David White
* @version (a version number or a date)
*/
public class Ordinance {
private int num;
private Direction direction;
public Ordinance(int num, Direction direction) {
this.num = num;
this.direction = direction;
}
public int getNum() {
return this.num;
}
public Direction getDirection() {
return this.direction;
}
}
The PuzzleTest.java
is used to make sure the methods I've written work in the way they're intended to.
PuzzleTest.java
package Skyscraper;
/**
* Write a description of class PuzzleTest here.
*
* @author David White
* @version (a version number or a date)
*/
public class PuzzleTest {
public static void main(String args) {
SkyscraperPuzzle p = new SkyscraperPuzzle();
int puzzle = p.getPuzzle();
/*
* Outputs entire puzzle
*/
for(int row : puzzle) {
for(int item : row) {
System.out.print(item + " ");
}
System.out.println();
}
System.out.println();
/*
* Test getColumn method
* Output should be
* 1
* 4
* 7
* Status: Successful
*/
int col = p.getColumn(0);
for(int i = 0; i < col.length; i++) {
System.out.println(col[i]);
}
System.out.println();
/*
* Test noDuplicates method
* Output should be
* true
* Status: Successful
*/
int arr = {1, 2, 3, 4, 5};
System.out.println(p.noDuplicates(arr));
System.out.println();
/*
* Test containsOneToN method
* Output should be
* true
* Status: Successful
*/
int arr2 = {1, 2, 3, 4, 5};
System.out.println(p.containsOneToN(arr2));
/*
* Test meetsOrdinances method
* Output should be
* true
* Status: To be tested
*/
}
}
java homework sudoku
$endgroup$
For an assignment, I have created a solver for the Skyscraper Puzzle:
Each puzzle consists of an N×N grid with some clues along its sides. The object is to place a skyscraper in each square, with a height between 1 and N, so that no two skyscrapers in a row or column have the same number of floors. In addition, the number of visible skyscrapers, as viewed from the direction of each clue, is equal to the value of the clue. Note that higher skyscrapers block the view of lower skyscrapers located behind them.
The puzzle and the ordinances are hard coded into the program. I would like feedback on efficiency and readability. Any and all suggestions are welcome!
SkyscraperPuzzle.java
package Skyscraper;
/**
* Write a description of class SkyscraperPuzzle here.
*
* @author David White
* @version (a version number or a date)
*/
public class SkyscraperPuzzle {
private int puzzle = {
{1, 4, 3, 2},
{2, 3, 4, 1},
{4, 2, 1, 3},
{3, 1, 2, 4}
};
private Ordinance ords = {
{new Ordinance(3, Direction.NORTH), new Ordinance(1, Direction.NORTH), new Ordinance(2, Direction.NORTH), new Ordinance(3, Direction.NORTH)}, //NORTH
{new Ordinance(2, Direction.SOUTH), new Ordinance(4, Direction.SOUTH), new Ordinance(2, Direction.SOUTH), new Ordinance(1, Direction.SOUTH)}, //SOUTH
{new Ordinance(3, Direction.EAST), new Ordinance(2, Direction.EAST), new Ordinance(2, Direction.EAST), new Ordinance(1, Direction.EAST)}, //EAST
{new Ordinance(2, Direction.WEST), new Ordinance(3, Direction.WEST), new Ordinance(1, Direction.WEST), new Ordinance(2, Direction.WEST)} //WEST
};
/**
* Write a constructor to initialize and populate the puzzle and list of ordinances
* so that the puzzle may be checked to see if it is (correctly) solved.
*/
public SkyscraperPuzzle() {
//Puzzle is populated above
//Ords is populated above
}
/**
* returns the puzzle
*/
public int getPuzzle() {
return this.puzzle;
}
/**
* Retuns a 1D array that respresents row r of puzzle
*/
public int getRow(int row) {
return puzzle[row];
}
/**
* Write a method that returns a 1D array that represents column c of puzzle
*/
public int getColumn(int column) { // row by column
int arr = new int[this.puzzle.length];
for(int i = 0; i < this.puzzle.length; i++) {
arr[i] = this.puzzle[i][column];
}
return arr;
}
/**
* Write a method that returns true if the 1D array parameter does not contain duplicates
*/
public boolean noDuplicates(int arr) {
for(int i = 0; i < arr.length - 1; i++) {
for(int j = i + 1; j < arr.length - 1; j++) {
if(arr[i] == arr[j]) {
return false;
}
}
}
return true;
}
/**
* Write a method that returns true if each value from 1 to the number of rows (or columns, they
* are the same), is contained in the 1D array
*
* if 5x5
* then 1 2 3 4 5 should all be in array
*/
public boolean containsOneToN(int arr) {
int array = new int[arr.length];
int count = 0;
for(int i = 0; i < array.length; i++) {
array[i] = i + 1;
}
for(int i = 0; i < arr.length; i++) {
for(int j = 0; j < array.length; j++) {
if(arr[i] == array[j]) {
count += 1;
array[j] = 0;
}
}
}
return count == arr.length;
}
/**
* Write a method that traverses the 2D array, ords, and returns true if each and
* every Ordinance requirement is met
*/
public boolean meetsOrdinances() {
for(int i = 0; i < this.puzzle.length; i++) {
/* Yet to be implemented */
}
return false; //used to allow compile
}
/**
* Write a method that returns true if the puzzle is a correctly solved Skyscraper puzzle
*/
public boolean isSolved() {
/* Each row and column */
for(int i = 0; i < this.puzzle.length; i++) {
if(!noDuplicates(this.puzzle[i]) || !noDuplicates(getColumn(i))) {
return false;
}
if(!containsOneToN(this.puzzle[i]) || !containsOneToN(getColumn(i))) {
return false;
}
if(!meetsOrdinances()) {
return false;
}
}
return true;
}
}
Direction.java
package Skyscraper;
/**
* Enumeration class Direction - write a description of the enum class here
*
* @author David White
* @version (version number or date here)
*/
public enum Direction {
NORTH, /* Above the 2D array */
SOUTH, /* Below the 2D array */
EAST, /* Right of the 2D array */
WEST /* Left of the 2D array */
}
Ordinance.java
package Skyscraper;
/**
* Write a description of class Ordinance here.
*
* @author David White
* @version (a version number or a date)
*/
public class Ordinance {
private int num;
private Direction direction;
public Ordinance(int num, Direction direction) {
this.num = num;
this.direction = direction;
}
public int getNum() {
return this.num;
}
public Direction getDirection() {
return this.direction;
}
}
The PuzzleTest.java
is used to make sure the methods I've written work in the way they're intended to.
PuzzleTest.java
package Skyscraper;
/**
* Write a description of class PuzzleTest here.
*
* @author David White
* @version (a version number or a date)
*/
public class PuzzleTest {
public static void main(String args) {
SkyscraperPuzzle p = new SkyscraperPuzzle();
int puzzle = p.getPuzzle();
/*
* Outputs entire puzzle
*/
for(int row : puzzle) {
for(int item : row) {
System.out.print(item + " ");
}
System.out.println();
}
System.out.println();
/*
* Test getColumn method
* Output should be
* 1
* 4
* 7
* Status: Successful
*/
int col = p.getColumn(0);
for(int i = 0; i < col.length; i++) {
System.out.println(col[i]);
}
System.out.println();
/*
* Test noDuplicates method
* Output should be
* true
* Status: Successful
*/
int arr = {1, 2, 3, 4, 5};
System.out.println(p.noDuplicates(arr));
System.out.println();
/*
* Test containsOneToN method
* Output should be
* true
* Status: Successful
*/
int arr2 = {1, 2, 3, 4, 5};
System.out.println(p.containsOneToN(arr2));
/*
* Test meetsOrdinances method
* Output should be
* true
* Status: To be tested
*/
}
}
java homework sudoku
java homework sudoku
edited 7 mins ago
200_success
130k16153417
130k16153417
asked 8 hours ago
David WhiteDavid White
277413
277413
1
$begingroup$
@200_success Yes, just edited the post to add the description.
$endgroup$
– David White
24 mins ago
add a comment |
1
$begingroup$
@200_success Yes, just edited the post to add the description.
$endgroup$
– David White
24 mins ago
1
1
$begingroup$
@200_success Yes, just edited the post to add the description.
$endgroup$
– David White
24 mins ago
$begingroup$
@200_success Yes, just edited the post to add the description.
$endgroup$
– David White
24 mins ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
});
});
}, "mathjax-editing");
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "196"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f214569%2fskyscraper-puzzle-solver-in-java%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Code Review Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f214569%2fskyscraper-puzzle-solver-in-java%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
@200_success Yes, just edited the post to add the description.
$endgroup$
– David White
24 mins ago