Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: making code color independant

Author: William H Rogers

Date: 10:52:51 12/08/03

Go up one level in this thread


When I first wrote my chess program I use '1' for white and '-1' for black. In
doing so my move routine worked for either color. I multiplied color * -1 to
switch sides and in the case of pawns if x>7 or x<2 I would promote.
Bill



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.