Author: Albert Bertilsson
Date: 08:44:29 03/03/03
Go up one level in this thread
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
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.