Article View: gnu.chess
Article #5128Re: Newgame needs to init KILLT
From: Chua Kong Sian
Date: Sat, 19 Feb 1994 02:13
Date: Sat, 19 Feb 1994 02:13
25 lines
1701 bytes
1701 bytes
Roger Uzun (uzun@crash.cts.com) wrote: : When KILLT is defined, new game should clear it out and do : an Initialize_dist near the end. That is NewGame (). : Also GetGame should probably clear out killt[] and call initialize_dist, : or perhaps just clear out killt[]. : -Roger : -------------------------------------------------------------- : bix: ruzun : NET: uzun@crash.cts.com This is not actually necessary as killt[] is always kept in its original state. Killt is only changed in genmoves.c and these changes are always undone before exiting. However Roger also pointed out some init problems. He suggested that QueenCheck[0] should be set to 0. We should probably do the same to ChkFlag[0] too. Another more serious problem is the PawnStorm static variable. This is set to false once and never again. This would mean that subsequent games could start with a PawnStorm of true which is wrong. The simplest way is to remove the static declaration and always assume PawnStorm is false. The calculation for PawnStorm status is very very cheap after all. Kong Sian
Technical Details
Message-ID:
<2k3skr$g13@nuscc.nus.sg>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!raffles.technet.sg!nuscc.nus.sg!nsrccksReferences:
<CLF7JC.2EA@crash.cts.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d71d,3906b3c12308886b X-Google-Attributes: gid10d71d,public X-Google-ArrivalTime: 1994-02-18 18:13:47 PST Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!raffles.technet.sg!nuscc.nus.sg!nsrccks From: nsrccks@leonis.nus.sg (Chua Kong Sian) Newsgroups: gnu.chess Subject: Re: Newgame needs to init KILLT Date: 19 Feb 1994 02:13:47 GMT Organization: National University of Singapore Lines: 25 Message-ID: <2k3skr$g13@nuscc.nus.sg> References: <CLF7JC.2EA@crash.cts.com> NNTP-Posting-Host: leonis.nus.sg X-Newsreader: TIN [version 1.2 PL0]