AbstractCastling

abstract class AbstractCastling<C : AbstractChess2D>(castleWidth: Int, p1CanCastleLeft: Boolean, p1CanCastleRight: Boolean, p2CanCastleLeft: Boolean, p2CanCastleRight: Boolean) : SpecialRules2D<C>

General Castling Logic

Constructors

AbstractCastling
Link copied to clipboard
fun AbstractCastling(castleWidth: Int, p1CanCastleLeft: Boolean = true, p1CanCastleRight: Boolean = true, p2CanCastleLeft: Boolean = true, p2CanCastleRight: Boolean = true)

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getPossibleMoves
Link copied to clipboard
open override fun getPossibleMoves(game: C, player: Player, moves: MutableList<Move2D>)
Modifies the given moves by either adding moves which satisfy a special condition, or modifying the moves to make sure they all satisfy the condition.
hashCode
Link copied to clipboard
open fun hashCode(): Int
toString
Link copied to clipboard
open fun toString(): String

Inheritors

CapablancaCastling
Link copied to clipboard
Chess960Castling
Link copied to clipboard
StandardCastling
Link copied to clipboard