Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Windrunner on September 13, 2004, 10:43:53 am
-
This is a question for the SCP programmers.
Its like this, i got an asignment today for my programming course to solve an old chess problem called The Knights Tour. Maybe some you programmers have heard about it. I have to write an algorithm in C language so that the knight can go through all chess squares once.
Iv'e found some source codes on the Google that shows how other people have solved but those codes are to advanced for me.
I wonder if some you know where i can find some good and easy to understand code for this problem?
Thanks
-
I think first you should try to figure some logic for how to do it first, the actual representation would be easy, a 2d array of bools, the knights position would be to ints, and you look up the bool array to see were you have been, only thing moderately tricky would be moveing, but you could do that by hand.
-
thanks for the help Bob :)