Class ChessHorseOne

java.lang.Object
topics.backtracking.ChessHorseOne

public class ChessHorseOne extends Object
BACKTRACKING PROBLEM: THE HORSE JUMPING PROBLEM This program calculates all the ways of moving a horse through an entire chessboard of side n
Author:
vicegd
  • Constructor Details

    • ChessHorseOne

      public ChessHorseOne(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()
    • isSolution

      public boolean isSolution()
      Returns whether there is a solution
      Returns:
      True is there is a solution. False otherwise