billforsternz / thc-chess-library

General Purpose Rules of Chess Library for C++
MIT License
38 stars 13 forks source link

Half/Full move clock doesn't decrement #12

Closed laurenzlevi closed 3 years ago

laurenzlevi commented 3 years ago

Half move clock and full move clock of ChessPositionRaw don't decrement when calling ChessRules::PopMove resulting in possibly false detected draws by 50 move rule

billforsternz commented 3 years ago

The intended behaviour is that these counters are incremented in PlayMove() as that commits permanently to a move, but not touched in PushMove() / PopMove() which need to be as fast as possible for their purpose of making and undoing temporary position changes for the purpose of move generation only, So this is not a valid issue, in particular the fact that PushMove() doesn't increment implies that PopMove() shouldn't decrement. Closing Issue. (If I am missing anything please re-open!)