Hacker News new | ask | show | jobs
by tartoran 2362 days ago
I first found it helpful to see how many moves it takes a knight to jump from one square to another by looking at the vertical and horizontal axes:

  |        2
  |        3
  |        2
  |        3
  |2 3 2 3 K 3 2 3
  |        3
  |        2
  |        3
Then by looking at the diagonals:

  |4       2       4
  |  2     3     2
  |    4   2   4
  |      2 3 2
  |2 3 2 3 K 3 2 3
  |      2 3 2
  |    4   2   4
  |   2    3     2
  |
  |
Finally looking at the map:

  |
  |8| 4 3 2 3 2 3 2 3
  |7| 3 2 3 4 1 2 1 4 
  |6| 4 3 2 1 2 3 2 1 
  |5| 3 2 3 2 3 K 3 2 
  |4| 4 3 2 1 2 3 2 1 
  |3| 3 2 3 4 1 2 1 4 
  |2| 4 3 2 3 2 3 2 3 
  |1| 3 4 3 2 3 2 3 2 
  | +----------------
  |   a b c d e f g h
1 comments

What is the K in that last graph (F5) and why did it move compared to previous?
K is the knight or just a knight on a chess board. The numbers represent how many moves to get to each square. Hope this helps
A question I had (which might be the same as the one asked above) was why you chose to place it off-center.
It could be anywhere, the numbers will translate as well. Try to do it by hand as an exercise.