Class ChessHorseAll

java.lang.Object
topics.backtracking.ChessHorseAll

public class ChessHorseAll extends Object
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 Details

    • ChessHorseAll

      public ChessHorseAll(int n, int startingX, int startingY)
      Constructor for ChessHorseOne objects
      Parameters:
      n - Size of the board
      startingX - 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