Skip to content

Implement other draw scenarios #2

@roh1th-s

Description

@roh1th-s

A Chess game can end in a tie in many ways. At the moment, we're only checking for stalemate. Implement detection of the 50-move rule, threefold repetition and dead positions.

  • You may add fields to the ChessBoard/ChessGame structs for the fifty-move counter and to keep track of repetitions. Zobrist Hashing can be used for efficient repetition detection. Note: Searching through previous moves for repetition is fairly cheap since it often does not require looking through the entire list - pawn moves and captures make repetition of previous positions impossible.
  • Checks can be made in the check_chess_state function.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions