Author: Andreas Guettinger
Date: 11:36:10 03/03/03
Go up one level in this thread
On March 03, 2003 at 14:11:20, Dann Corbit wrote:
>>
>>But then, when I have to scan to the piecelist, I have to scan through 12 lists.
>>I don't like that.
>
>12 checks for a count of zero, compared to sorting. Which do you like better?
>
>Another plus for separate piece lists:
>
>while (knights--) do_knight_moves();
>verses:
>switch (piece_type)
>{
>case knight:
>do_knight_moves();
>break;
>...
>}
Well, on second thought I already realized that maybe the first impression is
not always the best. :) It needs in someparts more coding, but it doesn't have
to be slower.
But then, how do you perform domove() and update the piece list?
switch(piece_type)
{
case knight:
knight_move();
update_knight_list();
break;
...
}
With my old list (which isn't sorted), I just do rochade, enpassant, captures
and nocaptures differently in domove().
regards
Andy
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.