It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

knights movement on a chess board??

page: 1
0

log in

join
share:

posted on Mar, 23 2006 @ 12:14 PM
link   
i have to write a program in java to basically determine all the possible movements of the knight piece of a chess board. I really dont have much more than a simple algorithm lol. Do any programmers have any hints or ideas for me? or if you did it in another language can i look at it and get an idea?thanks



posted on Apr, 18 2006 @ 06:46 PM
link   
show me what you got maybe i can help



posted on Apr, 18 2006 @ 08:38 PM
link   
Think of the chess board as a 2D array

arrray [][];

Now for the moves just add (or subtract) 2 from one dimension, and then one on the other. Of course you'll have to do some boundry check, but that's pretty much it.



posted on Apr, 19 2006 @ 01:30 AM
link   
To be honest I'm not the best Java programmer in the world, but if I can give my 2 cents:
This site shows the source code for a Java Script Chess game.
Programmers Heaven gives the complete Java project for a simple Chess game.

I know you don't want to copy and paste someone else's work - that would be beyond the point. But looking at someone else's ideas should get the creative juices flowing.

This Site gives a complete description on the theory behind creating a chess program. Highly recommended.



new topics

top topics
 
0

log in

join