Class ChessHorseAll
java.lang.Object
topics.backtracking.ChessHorseAll
BACKTRACKING PROBLEM: THE HORSE JUMPING PROBLEM
The program calculates all the ways of moving a
horse through an entire chessboard of side n
- Author:
- vicegd
-
Constructor Summary
ConstructorsConstructorDescriptionChessHorseAll(int n, int startingX, int startingY) Constructor for ChessHorseOne objects -
Method Summary
Modifier and TypeMethodDescriptionvoidintGets the number of solutions after the backtracking process
-
Constructor Details
-
ChessHorseAll
public ChessHorseAll(int n, int startingX, int startingY) Constructor for ChessHorseOne objects- Parameters:
n- Size of the boardstartingX- starting position in the board (horizontally)startingY- starting position in the board (vertically)
-
-
Method Details
-
backtracking
public void backtracking() -
getNumberOfSolutions
public int getNumberOfSolutions()Gets the number of solutions after the backtracking process- Returns:
- Number of solutions
-