@@ -40,18 +40,12 @@ const (
4040DrawOffer
4141// Stalemate indicates that the game was drawn by stalemate.
4242Stalemate
43- // ThreefoldRepetition indicates that the game was drawn when the game
44- // state was repeated three times and a player requested a draw .
43+ // ThreefoldRepetition indicates that the game was automatically drawn
44+ // by the game state being repeated three times.
4545ThreefoldRepetition
46- // FivefoldRepetition indicates that the game was automatically drawn
47- // by the game state being repeated five times.
48- FivefoldRepetition
49- // FiftyMoveRule indicates that the game was drawn by the half
50- // move clock being one hundred or greater when a player requested a draw.
51- FiftyMoveRule
52- // SeventyFiveMoveRule indicates that the game was automatically drawn
53- // when the half move clock was one hundred and fifty or greater.
54- SeventyFiveMoveRule
46+ // TwentyFiveMoveRule indicates that the game was automatically drawn
47+ // when the half move clock was fifty or greater.
48+ TwentyFiveMoveRule
5549// InsufficientMaterial indicates that the game was automatically drawn
5650// because there was insufficient material for checkmate.
5751InsufficientMaterial
@@ -267,10 +261,6 @@ func (g *Game) Draw(method Method) error {
267261if g .numRepetitions () < 3 {
268262return errors .New ("octad: draw by ThreefoldRepetition requires at least three repetitions of the current board state" )
269263}
270- case FiftyMoveRule :
271- if g .pos .halfMoveClock < 100 {
272- return fmt .Errorf ("octad: draw by FiftyMoveRule requires the half move clock to be at 100 or greater but is %d" , g .pos .halfMoveClock )
273- }
274264case DrawOffer :
275265default :
276266return fmt .Errorf ("octad: unsupported draw method %s" , method .String ())
@@ -300,9 +290,6 @@ func (g *Game) EligibleDraws() []Method {
300290if g .numRepetitions () >= 3 {
301291draws = append (draws , ThreefoldRepetition )
302292}
303- if g .pos .halfMoveClock >= 100 {
304- draws = append (draws , FiftyMoveRule )
305- }
306293return draws
307294}
308295
@@ -363,15 +350,15 @@ func (g *Game) updatePosition() {
363350}
364351
365352// five fold rep creates automatic draw
366- if ! g .ignoreAutomaticDraws && g .numRepetitions () >= 5 {
353+ if ! g .ignoreAutomaticDraws && g .numRepetitions () >= 3 {
367354g .outcome = Draw
368- g .method = FivefoldRepetition
355+ g .method = ThreefoldRepetition
369356}
370357
371358// 75 move rule creates automatic draw
372- if ! g .ignoreAutomaticDraws && g .pos .halfMoveClock >= 150 && g .method != Checkmate {
359+ if ! g .ignoreAutomaticDraws && g .pos .halfMoveClock >= 50 && g .method != Checkmate {
373360g .outcome = Draw
374- g .method = SeventyFiveMoveRule
361+ g .method = TwentyFiveMoveRule
375362}
376363
377364// insufficient material creates automatic draw
0 commit comments