Chess-Challenge icon indicating copy to clipboard operation
Chess-Challenge copied to clipboard

Feature request: hasGameEnded()

Open JellyWasCoding opened this issue 2 years ago • 3 comments

This feature can be good for simplifying the search algorithms. This function will return true if the game has ended with a checkmate of draw (it doesn't matter). Otherwise, it will return false.

JellyWasCoding avatar Jul 24 '23 08:07 JellyWasCoding

Combine it yourself? board.IsInCheckMate() || board.IsDraw()

ryanheath avatar Jul 24 '23 08:07 ryanheath

Combine it yourself? board.IsInCheckMate() || board.IsDraw()

isDraw works incorrectly

ArtHell avatar Jul 24 '23 10:07 ArtHell

I suggest using board.GetLegalMoves().Length == 0

ArtHell avatar Jul 24 '23 11:07 ArtHell