Solve a Holy Knight's tour

From Rosetta Code
Revision as of 12:06, 1 June 2014 by Nigel Galloway (talk | contribs) (Created page with "{{task}} Night's tours are similar to Hidato. When learning to play chess coaches torture (instruct) their charges by taking a chess board, placing s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Task
Solve a Holy Knight's tour
You are encouraged to solve this task according to the task description, using any language you may know.

Night's tours are similar to Hidato. When learning to play chess coaches torture (instruct) their charges by taking a chess board, placing some pennies on some squares and requiring that a Knight's tour is constructed which avoids squares with a penny on. The purpose of this task is to produce a solution to such problems. At least demonstrate you program by solving the following:

Example 1
  0 0 0 
  0   0 0 
  0 0 0 0 0 0 0
0 0 0     0   0
0   0     0 0 0
1 0 0 0 0 0 0
    0 0   0
      0 0 0

Extra credit is available for other interesting examples.