Releases: samhooper256/KnightL
Releases · samhooper256/KnightL
KnightL Full Release Version 1.0.1
You can run the app by downloading and running KnightL.jar.
I was originally inspired to write the algorithm to calculate the knight path by a HackerRank challenge
called "KnightLOnAChessboard." I then modified the algorithm a bit and decided to make an app that
would provide a visual representation of the algorithm.
The instructions are shown below (copied from the in-game instructions):
KnightL Instructions
The Basics
This is an app that shows you a knight on a chessboard and calculates the shortest path from the knight's position to any selected tile. The movement rules of the knight, the board size, and the enabled tiles can be adjusted by the user. To display the shortest path to a tile, simply click on a desired destination tile and numbers will appear indicating the order of moves the knight must take to get there. If a tile cannot be reached by any sequence of moves, an 'X' appears on the tile.Movement Controls
The two input boxes on the left, "A move" and "B move," control the knight's movement. By default, a knight in chess must move two tiles in one direction then one tile in a direction perpendicular to the first. These rules can be changed so that the knight must move A tiles in one direction and B tiles in a perpendicular one. Note that swapping the values of A and B will produce the same rule set. A and B cannot both be zero.Disabled Tiles
Tiles can be disabled or enabled. If a tile is disabled, the knight will not be allowed to step on that tile. Disabled tiles will restrict the knight's movement and can make accessing some spots impossible. You can enable/disable a tile by right-clicking it. A tile will become gray when disabled. By default, all tiles are enabled.Other Features
In order to change the starting point of the knight, simply middle-click a new starting tile. The knight cannot be moved to disabled tiles. If you would like to see the knight move along his path, you can use the left and right arrow keys while a path is selected (i.e. there are numbers on the board) to watch him traverse the path. You can change the size of the chessboard up to a maximum of 25x25 tiles with the slider in the bottom left. The sidebar panel can be resized by dragging the divider between the board and the sidebar left or right. There are some useful utility buttons located in the bottom left.Enjoy!
KnightL Full Release Version 1.0
You can run the app by downloading and running KnightL.jar.
I was originally inspired to write the algorithm to calculate the knight path by a HackerRank challenge
called "KnightLOnAChessboard." I then modified the algorithm a bit and decided to make an app that
would provide a visual representation of the algorithm.
The instructions are shown below (copied from the in-game instructions):