Author: Russell Reagan
Date: 12:58:23 03/17/04
Go up one level in this thread
On March 17, 2004 at 07:25:03, Fabien Letouzey wrote:
>
>Hello,
>
>Fruit 1.0 is now officially available for download
>at Leo Dijksman's WBEC Ridderkerk:
>
>http://wbec-ridderkerk.nl/
>
>Have fun,
>
>Fabien.
Hi Fabien,
Thanks for making your source code available.
We must have very similar thinking processes. I feel like I'm having deja vu
reading some of your source code. I am really amazed at how similar your code is
to mine. It is mostly the lower level classes. I have some of the same files as
you: board.h, color.h, move.h, piece.h, square.h, and they are very similar.
Your implementations of these are basically the struct version of my code (I use
classes for these). From how you name your classes (postfixing _t) to how you
protect duplicate header file inclusion (postfixing _H), there are a lot of
similarities. I feel like I'm reading my own code sometimes :)
There are definite differences though. You use structs where I use classes. You
are definitely farther along than I am. Your board representation is different.
The way you do higher level things like search is definitely different too.
Here is a comparison of our square.h files.
You have: void square_init ();
I have: square_t::square_t(); // constructor
You have: bool square_is_ok (int square);
I have: bool is_valid (square_t square);
bool is_square (square_t square);
You have: int square_make (int file, int rank);
I have: square_t::square_t (rank_t rank, file_t file); // constructor
You have: int square_file (int square);
I have: file_t to_file (square_t square);
You have: int square_rank (int square);
I have: rank_t to_rank (square_t square);
You have: int file_from_char (int c);
I have: file_t to_file (char c);
You have: int rank_from_char (int c);
I have: rank_t to_rank (char c);
You have: int file_to_char (int file);
I have: char to_char (file_t file);
You have: int rank_to_char (int rank);
I have: char to_char (rank_t rank);
You have: bool square_to_string (int square, char string[], int size);
I have: std::string to_string (square_t square);
You have: int square_from_string (const char string[]);
I have: square_t to_square (const std::string & square_string);
But I have no equivalent to these:
int square_from_64 (int square);
int square_to_64 (int square);
bool square_is_promote (int square);
int square_ep_dual (int square);
int square_colour (int square);
void square_disp (int square);
board.h, color.h, move.h, piece.h are all similar the same ways.
Anyway, I thought it was interesting :)
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.