progress report

by

I have written the code, but have not done any testing yet. (It took less time than I expected...)

>other components may depend on it

True...
However, I do need 2 chess boards... Which in my mind means board(0 to 1, 0 to 7, 0 to 7) AS Integer. Now, I imagine it is too late to change things, since Pete has already written code... What I can do is create my own array, so as not to interfere with the code already written...

btw, you know that your board array currently has 81 elements? The lbound is 0.

>LegalMove%("e1-c1") would return an evaluation of whether a queen-side castle is legal. To do that, it would expect an unmoved rook and king. That is why there are additional codes for these two pieces.

yes.

>It is not necessary for LegalMove% to care what a pawn promotes to. (Possibly already obvious to you). It just tests if c7-c8 is legal, for example. The other components of the program will determine what piece is wanted, etc.

correct. (I realized this last night, but not before inluding an extra parameter (which I have now removed))

While it is true that I don't need to know what the promotion rank will be, I do need to know whether the other player moved a pawn 2 steps in the immediately previous move. (En passan (spelling?) capture is only possible if the enemy's pawn moved 2 squares on the previous move). The way I recommend doing this is to have a single shared INTEGER, perhaps named "pawnspec". If a player moves his pawn 2 steps, pawnspec should be set to the x location of the pawn. If not, pawnspec should be set to -1.

So, assuming x numbers in a range of 1 to 8: White moves e2-e4; pawnspec is set to 5. Black moves e7-e5; pawnspec is set to 5. White moves d2-d3; pawnspec is set to -1.

I would appreciate it if this is accounted for.

I will post my code soon, but I want to test it first. I have a few changes to make, such as converting the (0 to 7) coordinates into (1 to 8) coordinates.
Regards,
Michael

Posted on Dec 20, 2005, 7:46 PM
from IP address 12.183.134.78

Respond to this message   

Return to Index


Response TitleAuthor and Date
Michael, my guess is we are working on two different functions...Pete on Dec 20
 *already wrote the "check" detection code. checkmate will be trickier. on Dec 20
um, code so far... on Dec 21