Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: "Piece List" - Administration?

Author: Andreas Guettinger

Date: 10:18:41 03/03/03

Go up one level in this thread


On March 03, 2003 at 11:44:29, Albert Bertilsson wrote:

>Here is how I do it:
>
>Have a piece list per side, one counter for each side telling the number of
>pieces.
>
>If you make a capture, swap the piece last in the array with the captured piece
>and decrease the counter for that list.
>
>For the captured piece in the list you need to store is original list position.
>
>In undo move you can just increase the counter and swap the piece back.
>
>/Regards Albert

I have a similar piece list. Because I want it sorted from the highest to the
lowest valued piece (for SEE/MVA), some small sorting is needed during
promotion. Recently I thought if it would not be faster to just copy the whole
picelist before domove() and restore it after undomove(). Any ideas?

regards
Andy



This page took 0.01 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.