ThreeFoldRepetitionStalemate

class ThreeFoldRepetitionStalemate : EndCondition2D<AbstractChess2D>

Condition for stalemate by three-fold-repetition.

In chess, the threefold repetition rule states that a player may claim a draw if the same position occurs three times.

Two positions are by definition "the same" if the same types of pieces occupy the same squares, the same player has the move, the remaining castling rights are the same and the possibility to capture en passant is the same.

The repeated positions need not occur in succession.

Constructors

ThreeFoldRepetitionStalemate
Link copied to clipboard
fun ThreeFoldRepetitionStalemate()

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
evaluate
Link copied to clipboard
open override fun evaluate(game: AbstractChess2D, player: Player, moves: List<Move2D>): Outcome?
Evaluate the condition and return an outcome if the game should end.
hashCode
Link copied to clipboard
open fun hashCode(): Int
toString
Link copied to clipboard
open fun toString(): String