Author Topic: The Knights Tour  (Read 1156 times)

0 Members and 1 Guest are viewing this topic.

Offline Windrunner

  • 210
  • The Hammer.
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
Staffmember: Hard Light Productions
I said a lot of things.  Some of them were even true. - Aldo_14

  

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
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.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Windrunner

  • 210
  • The Hammer.
thanks for the help Bob :)
Staffmember: Hard Light Productions
I said a lot of things.  Some of them were even true. - Aldo_14