Author: Russell Reagan
Date: 23:17:50 07/22/02
Go up one level in this thread
On July 23, 2002 at 00:33:52, Dann Corbit wrote: >Why all the is() functions? Because that is more readable. It makes more sense, and I don't have to wonder what it does. To me I think it's more clear if it says "if move is pawn push" than "if move pawn push". Just a personal taste. I might choose differently if I was releasing the source. >The promotions are just another possible move. >Do you say: >if (move.isKnightMove()..) >else if move.isPawnPush()... >... Right. I could just as easily say: if (move.knight()) else if (move.pawn()) ... and those would just be inlined functions that return a bool value, so it's no slower than: if (move.type == KNIGHT) else if (move.type == PAWN) ... Russell
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.