Author: Dieter Buerssner
Date: 11:48:47 01/13/03
Go up one level in this thread
On January 13, 2003 at 13:16:33, Bruce Moreland wrote: >This post has some good stuff, but some of it is soul-selling stuff. > >I am opposed to making "white" and "black" functions, because it is difficult to >keep them current. Invariably, something is missed and one of the functions has >a bug. I agree, Bruce. Actually, I wanted to add a comment, like the one you did above. >If this is going to be done, it should be done by including a file twice, but >that is also satanic. I wouldn't call it satanic. It might be easy (to maintain). Anyway, without some "trick" that can use exactly the same code twice, I would not do it. Especially in this case, I would guess, that there is very little gain. >Checking specifically for pawns is probably right. Looking at two squares on >the board is probably faster than spinning through 8 pawns. Yes, and more important, because Bas has the piece list sorted anyway. And, before anybody else mentions it. In another followup I suggested if (piece - 1 >= 0) break; This really looks a bit stupid. I forgot already, how I came to this (I had some more complicated, possibly more general method in mind first). Of course, the more straightforward if (piece >= pawn) break; should be preferred. Regards, Dieter
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.