Check out Symmetric Chess, our featured variant for March, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Chess. Play Chess online with other people, using Game Courier, a PBM system that works with any web browser on any computer.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Fri, Apr 27, 2012 05:30 PM UTC:
I have just added support for the 50 moves rule in Chess. Here is how it was done. I created a counter called nopvc, which means no Pawn or capture, and set it to zero. Whenever a Pawn moved or a piece was captured, it got reset to zero. Otherwise, it got incremented by 1. In the post-game part, I compared its value with 50. This is done after checkmate and stalemate are checked for just in case the 50th move resulted in a checkmate.

Also, I realized I was using a global variable for posvar in the code for enforcing three-times repetition. So I removed the code in the post-game part for computing the value of posvar. The value it needs to be has already been set the last time posvar was given a value.