Hi

Your first post and you assign us with your assignment?

I do not understand your description but are you talking about
the "famous" knight problem[1]? If so, then don't worry - it has
been solved for the 8x8 chessboard already in August 2003...[2]

As per how to solve it (it's just an NP hard problem ...): you need all
the moves. So, the only thing you can do is using a "backtracking"-algorithm.
In its simplest realisation, this is implemented using recursive functions.

You'll figure it out, I am sure.
Good luck.'
Cheers

p.s. while looking for a page which describes the backtracking algorithm
I stumbled across a solution to the knight problem ...

[1] http://en.wikipedia.org/wiki/Knight%27s_Tour
[2] http://mathworld.wolfram.com/news/20...06/magictours/