StandardRules

public class StandardRules : Rules

Standard chess move rules.

  • Initialise a new instance.

    Declaration

    Swift

    public init()
  • Generates available moves from square in given position.

    Declaration

    Swift

    public func movesForPiece(at square: Square, in position: Position) -> [Move]

    Parameters

    square

    Square of the piece.

    position

    Position.

    Return Value

    List of available moves.

  • Undocumented

    Declaration

    Swift

    public func coveredSquares(in position: Position) -> [Square]