Page 1 of 1

A freeware move generator source ccode for your own engines

PostPosted: 24 Aug 2008, 05:21
by mainsworthy
Hello , Ive finished Mainsworthy ( http://uk.geocities.com/avalomhilly/TextChes.zip ) and have started on Mainsworthy Advanced!

I remebered someone wanted a move generator and he was right a Rapid chess design system would need a premade move gen, so Ive put mine online ( http://uk.geocities.com/avalomhilly/movegen.zip )
its freeware its c++ source code and its 11kb only.

Mark

Re: A freeware move generator source ccode for your own engi

PostPosted: 24 Aug 2008, 05:56
by mainsworthy
Ive also included the source code for Mainsworthy here, so you have an example of putting the move generator to work, the code a little messy, but you will get the idea.

http://uk.geocities.com/avalomhilly/Mainsorc.zip

Re: A freeware move generator source ccode for your own engi

PostPosted: 30 Aug 2008, 04:48
by Dann Corbit
Here is a version which will compile under Microsoft Visual C++:
http://cap.connx.com/chess-engines/new- ... worthy.zip

I fixed a few obvious bugs and left one that I could not decipher (see comment with BUGBUG:DRC)

Re: A freeware move generator source ccode for your own engi

PostPosted: 30 Aug 2008, 06:25
by mainsworthy
Wow Dann didnt expect this, I will read through it tonight, thanks Mark

Re: A freeware move generator source ccode for your own engi

PostPosted: 30 Aug 2008, 07:26
by mainsworthy
if you change these function names in attack2.cpp

int xshiftright(unsigned char board[8])
int xshiftleft(unsigned char board[8])
int xshiftup(unsigned char board[8])
int xshiftdown(unsigned char board[8])

change them to:

int shiftright(unsigned char board[8])
int shiftleft(unsigned char board[8])
int shiftup(unsigned char board[8])
int shiftdown(unsigned char board[8])

drop the x from the name , then attack.cpp is no longer needed
so you can remove the include <attack.cpp> from move.cpp



thanks Mark