Bug #13133 [Com]: stalemate

From: Date: Thu, 29 Dec 2016 18:01:07 +0000
Subject: Bug #13133 [Com]: stalemate
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-11352@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=13133&edit=1 ID: 13133 Comment by: jkgarner Reported By: jkgarner at yahoo dot com Summary: stalemate Status: Open Type: Bug Package: Games_Chess Package Version: 1.0.1 PHP Version: 5.2.5 New Comment: I am not sure hat caused the bug listed, as I was unable to view the game on facebook listed. However, in looking at the code, I saw an obvious logical error that will cause the game to declare a draw too soon. code in package: /** * Determine whether any pawn move or capture has occurred in the past 50 moves * @return boolean */ function in50MoveDraw() { return $this->_halfMoves >= 50; } IN relation to the 50 move rule, a player must move 50 times with no capture and no pawn movement. This is tracked nicely with the _halfMove variable, which is incremented whenever a player makes any move, eitther side. This is also called plys in chess programing circles. The ply count of 35 or halfMove count of 50 cooresponds with a move count of 25. This code will throw the 50 mvoe rule draw when a player gets to 25 moves, far too soon. The check should be to 100 or greater. Previous Comments: ------------------------------------------------------------------------ [2008-02-16 10:52:05] dapetras Description: ------------ In the process of mating my opponent with a Bishop and Knight when the game was suddenly and incorrectly declared a stalemate. Check facebook game # 537921 I have no idea what PHP package version as I am a facebook end user and am having a problem. ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=13133&edit=1

« previous php.pear.bugs (#11352) next »