### Initialize bitboard with init(startFor:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28startfor%3A%29 Creates a starting bitboard for the specified piece. ```swift init(startFor piece: Piece) ``` -------------------------------- ### init(start:end:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/move/init%28start%3Aend%3A%29 Initializes a new instance with specified start and end locations. ```APIDOC ## init(start:end:) ### Description Initializes a new object with the provided start and end locations. ### Signature ```swift init( start: Location, end: Location ) ``` ### Parameters - **start** (Location) - The starting location. - **end** (Location) - The ending location. ``` -------------------------------- ### init(startFor:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/rank/init%28startfor%3A%29 Initializes a new instance of the Rank object with a specified starting player color. ```APIDOC ## init(startFor:) ### Description Initializes a new instance of the Rank object. This method sets the starting state based on the provided player color. ### Signature `init(startFor color: PlayerColor)` ### Parameters - **color** (PlayerColor) - Required - The starting player color for the rank instance. ``` -------------------------------- ### init(move:) Initializer Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28move%3A%29 Creates a bitboard from the start and end of a Move object. ```swift init(move: Move) ``` -------------------------------- ### PGNTag.setUp case Source: https://nsstudent.dev/fischer-core/documentation/fischercore/pgntag/setup The case identifier for the setUp property. ```text case setUp ``` -------------------------------- ### starts(with:) method signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/starts%28with%3A%29 The method signature for starts(with:) as defined in FischerCoreSwift. ```swift func starts(with possiblePrefix: PossiblePrefix) -> Bool where PossiblePrefix : Sequence, Self.Element == PossiblePrefix.Element ``` -------------------------------- ### init(start:end:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/move/init%28start%3Aend%3A%29 The initializer signature for init(start:end:) requiring start and end parameters of type Location. ```swift init( start: Location, end: Location ) ``` -------------------------------- ### starts(with:by:) method signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/starts%28with%3Aby%3A%29 The method signature for starts(with:by:) as defined in FischerCoreSwift. ```swift func starts( with possiblePrefix: PossiblePrefix, by areEquivalent: (Self.Element, PossiblePrefix.Element) throws -> Bool ) rethrows -> Bool where PossiblePrefix : Sequence ``` -------------------------------- ### Define start instance property Source: https://nsstudent.dev/fischer-core/documentation/fischercore/move/start Declares the start property as a Square type. ```typescript var start: Square ``` -------------------------------- ### Define start property Source: https://nsstudent.dev/fischer-core/documentation/fischercore/ucimovevalue/start The start property is defined as a Square type. ```typescript let start: Square ``` -------------------------------- ### rewindToStart() Source: https://nsstudent.dev/fischer-core/documentation/fischercore/game/rewindtostart%28%29 Undoes all moves in the game to return to the initial starting position. ```APIDOC ## rewindToStart() ### Description Undoes all moves performed in the game until the game reaches its initial position. ### Signature `mutating func rewindToStart()` ``` -------------------------------- ### func starts(with:by:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/starts%28with%3Aby%3A%29 Checks if the sequence begins with the elements of another sequence, using a closure to determine if elements are equivalent. ```APIDOC ## func starts(with:by:) ### Description Returns a Boolean value indicating whether the initial elements of the sequence are the same as the elements in another sequence, using the provided predicate to test for equivalence. ### Signature `func starts(with possiblePrefix: PossiblePrefix, by areEquivalent: (Self.Element, PossiblePrefix.Element) throws -> Bool) rethrows -> Bool where PossiblePrefix : Sequence` ### Parameters - **possiblePrefix** (PossiblePrefix) - The sequence to compare to the start of this sequence. - **areEquivalent** ((Self.Element, PossiblePrefix.Element) throws -> Bool) - A closure that takes two elements as arguments and returns a Boolean value indicating whether they are equivalent. ``` -------------------------------- ### func starts(with possiblePrefix: PossiblePrefix) -> Bool Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/starts%28with%3A%29 Returns a Boolean value indicating whether the initial elements of the sequence are the same as the elements in another sequence. ```APIDOC ## func starts(with possiblePrefix: PossiblePrefix) -> Bool ### Description Returns a Boolean value indicating whether the initial elements of the sequence are the same as the elements in another sequence. ### Signature `func starts(with possiblePrefix: PossiblePrefix) -> Bool where PossiblePrefix : Sequence, Self.Element == PossiblePrefix.Element` ### Parameters - **possiblePrefix** (PossiblePrefix) - Required - A sequence to compare to the start of this sequence. ### Returns - **Bool** - true if the initial elements of the sequence are the same as the elements in `possiblePrefix`; otherwise, false. ``` -------------------------------- ### Position Initializer Source: https://nsstudent.dev/fischer-core/documentation/fischercore/position/init%28board%3Aplayerturn%3Acastlingrights%3Aenpassanttarget%3Ahalfmoves%3Afullmoves%3A%29 The initializer for the Position class with default values for a standard starting chess position. ```swift init( board: Board = Board(), playerTurn: PlayerColor = .white, castlingRights: CastlingRights = .all, enPassantTarget: Square? = nil, halfmoves: UInt = 0, fullmoves: UInt = 1 ) ``` -------------------------------- ### init(startFor:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28startfor%3A%29 Initializes a new bitboard instance configured for the specified piece. ```APIDOC ## init(startFor:) ### Description Creates a starting bitboard for the provided `piece`. ### Signature `init(startFor piece: Piece)` ### Parameters - **piece** (Piece) - Required - The piece type for which the bitboard is initialized. ``` -------------------------------- ### init(file:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28file%3A%29 Initializes a new bitboard instance based on the provided file. ```APIDOC ## init(file:) ### Description Creates a bitboard mask for the specified file. ### Signature `init(file: File)` ### Parameters - **file** (File) - Required - The file object used to initialize the bitboard mask. ``` -------------------------------- ### init(with:whitePlayer:blackPlayer:variant:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/game/init%28with%3Awhiteplayer%3Ablackplayer%3Avariant%3A%29 Initializes a new game instance with the specified FEN string, player names, and game variant. ```APIDOC ## init(with:whitePlayer:blackPlayer:variant:) ### Description Initializes a new game instance. This method throws an error if the initialization fails. ### Signature `init(with fen: String, whitePlayer: String = "", blackPlayer: String = "", variant: Variant = .standard) throws` ### Parameters - **fen** (String) - Required - The board state in FEN (Forsyth-Edwards Notation) format. - **whitePlayer** (String) - Optional - The name or identifier of the white player. Defaults to an empty string. - **blackPlayer** (String) - Optional - The name or identifier of the black player. Defaults to an empty string. - **variant** (Variant) - Optional - The game variant to use. Defaults to `.standard`. ``` -------------------------------- ### init() Source: https://nsstudent.dev/fischer-core/documentation/fischercore/basicpgnreader Initializes a new instance of the BasicPGNReader. ```APIDOC ## init() ### Description Initializes a new instance of the BasicPGNReader struct. ``` -------------------------------- ### init(loading:moveToEnd:considerHalfmoves:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/game/init%28loading%3Amovetoend%3Aconsiderhalfmoves%3A%29 Initializes a new game instance with a PGNGame object and optional configuration flags. ```APIDOC ## init(loading:moveToEnd:considerHalfmoves:) ### Description Initializes a game instance using a provided PGNGame object. Allows configuration for moving to the end of the game and considering half-moves. ### Signature ```swift init( loading pgnGame: PGNGame, moveToEnd: Bool = false, considerHalfmoves: Bool = true ) throws ``` ### Parameters - **loading** (PGNGame) - Required - The PGNGame object to load. - **moveToEnd** (Bool) - Optional - Whether to move to the end of the game. Defaults to false. - **considerHalfmoves** (Bool) - Optional - Whether to consider half-moves. Defaults to true. ### Throws - Throws an error if the initialization fails. ``` -------------------------------- ### fromSquare property definition Source: https://nsstudent.dev/fischer-core/documentation/fischercore/pgnarrow/fromsquare The starting square of the arrow. ```javascript var fromSquare: Square ``` -------------------------------- ### init() Source: https://nsstudent.dev/fischer-core/documentation/fischercore/board/init%28%29 Initializes the board component. ```APIDOC ## init() ### Description Initializes the board component. ### Signature `init()` ``` -------------------------------- ### init() Source: https://nsstudent.dev/fischer-core/documentation/fischercore/basicpgnreader/init%28%29 Initializes the BasicPGNReader instance. ```APIDOC ## init() ### Description Initializes the BasicPGNReader component. This method is used to set up the reader instance for processing PGN data. ### Signature `init()` ``` -------------------------------- ### init(location:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28location%3A%29 Initializes a new instance of the Bitboard class with a specified location. ```APIDOC ## init(location:) ### Description Initializes a new Bitboard instance at the provided location. ### Signature `init(location: Location)` ### Parameters - **location** (Location) - Required - The location used to initialize the bitboard. ``` -------------------------------- ### fromSquare Source: https://nsstudent.dev/fischer-core/documentation/fischercore/pgnarrow/fromsquare The fromSquare property defines the starting square of the arrow. ```APIDOC ## Property: fromSquare ### Description The starting square of the arrow. ### Type Square ``` -------------------------------- ### init(move:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28move%3A%29 Initializes a new Bitboard instance using the provided Move object. ```APIDOC ## init(move:) ### Description Creates a bitboard from the start and end positions of the provided `move` object. ### Signature `init(move: Move)` ### Parameters - **move** (Move) - Required - The move object containing the start and end positions used to initialize the bitboard. ``` -------------------------------- ### >>>(_:_:) Operator Source: https://nsstudent.dev/fischer-core/documentation/fischercore/___%28_%3A_%3A%29-8knlx The >>>(_:_:) operator creates a Move from a start Location to an end Location. ```APIDOC ## >>>(_:_:) Operator ### Description Creates a Move object based on a starting location and a destination location. ### Signature `func >>> (start: Location, rhs: Location) -> Move` ### Parameters - **start** (Location) - The starting point of the move. - **rhs** (Location) - The destination point of the move. ### Returns - **Move** - A Move object representing the transition between the two locations. ``` -------------------------------- ### init(locations:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28locations%3A%29 Initializes a new Bitboard instance using a sequence of file and rank locations. ```APIDOC ## init(locations:) ### Description Creates a bitboard from a sequence of locations, where each location is defined by a file and a rank. ### Signature `init(locations: S) where S : Sequence, S.Element == (file: File, rank: Rank)` ``` -------------------------------- ### init(tags:game:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/basicpgngame/init%28tags%3Agame%3A%29 Initializes a new instance of BasicPGNGame with the provided PGN tags and game content. ```APIDOC ## init(tags:game:) ### Description Initializes a new instance of BasicPGNGame with the provided PGN tags and game content. ### Signature ```swift init( tags: [PGNTag : String], game: String ) ``` ### Parameters - **tags** ([PGNTag : String]) - A dictionary of PGN tags associated with the game. - **game** (String) - The game content string. ``` -------------------------------- ### >>>(_:_:) Operator Source: https://nsstudent.dev/fischer-core/documentation/fischercore/___%28_%3A_%3A%29-4j0cy The >>> operator creates a Move object from a starting Square to an ending Square. ```APIDOC ## >>>(_:_:) Operator ### Description Creates a Move object based on the provided start and end Square instances. ### Signature `func >>> (start: Square, end: Square) -> Move` ### Parameters - **start** (Square) - The starting square of the move. - **end** (Square) - The ending square of the move. ### Returns - **Move** - A Move object representing the transition from start to end. ``` -------------------------------- ### init(kind:color:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/piece/init%28kind%3Acolor%3A%29 Initializes a new instance of a Piece with the provided kind and color. ```APIDOC ## init(kind:color:) ### Description Initializes a new Piece object with a specific kind and player color. ### Signature `init(kind: Piece.Kind, color: PlayerColor)` ### Parameters - **kind** (Piece.Kind) - Required - The type of the piece. - **color** (PlayerColor) - Required - The color of the player owning the piece. ``` -------------------------------- ### init(file:) Initializer Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28file%3A%29 Initializes a bitboard mask for the specified file. ```swift init(file: File) ``` -------------------------------- ### >>>(_:_:) Operator Definition Source: https://nsstudent.dev/fischer-core/documentation/fischercore/___%28_%3A_%3A%29-4j0cy The operator signature for creating a Move from a start Square to an end Square. ```swift func >>> (start: Square, end: Square) -> Move ``` -------------------------------- ### >>>(_:_:) Operator Definition Source: https://nsstudent.dev/fischer-core/documentation/fischercore/___%28_%3A_%3A%29-8knlx Defines the >>> operator which takes a start and end location to return a Move. ```swift func >>> (start: Location, rhs: Location) -> Move ``` -------------------------------- ### init(fen:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/board/init%28fen%3A%29 Initializes a Board instance from a FEN string. Returns nil if the provided FEN string is invalid. ```APIDOC ## init(fen:) ### Description Initializes a `Board` instance from a FEN (Forsyth–Edwards Notation) string. This parses the piece placement section of the FEN string and sets up the board accordingly. ### Signature `init?(fen: String)` ### Parameters - **fen** (String) - Required - A FEN string describing a board position. ### Return Value A `Board` instance with pieces placed according to the FEN, or `nil` if the FEN is invalid. ``` -------------------------------- ### init(whitePlayer:blackPlayer:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/game/init%28whiteplayer%3Ablackplayer%3A%29 Initializes a new game instance with the specified players. ```APIDOC ## init(whitePlayer:blackPlayer:) ### Description Initializes a new game instance. Allows setting the names or identifiers for the white and black players. ### Signature `init(whitePlayer: String = "", blackPlayer: String = "")` ### Parameters - **whitePlayer** (String) - Optional - The identifier for the white player. Defaults to an empty string. - **blackPlayer** (String) - Optional - The identifier for the black player. Defaults to an empty string. ``` -------------------------------- ### static func triangleIndex(_:_:) -> Int Source: https://nsstudent.dev/fischer-core/documentation/fischercore/tables/triangleindex%28_%3A_%3A%29 Calculates the index of a triangle defined by a start and end square. ```APIDOC ## static func triangleIndex(_:_:) -> Int ### Description Calculates the triangle index between two specified squares. ### Signature `static func triangleIndex(_ start: Square, _ end: Square) -> Int` ### Parameters - **start** (Square) - The starting square. - **end** (Square) - The ending square. ### Returns - **Int** - The calculated triangle index. ``` -------------------------------- ### init(san:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/sanmove/init%28san%3A%29 Initializes a new instance of SANMove with the provided SAN string. ```APIDOC ## init(san:) ### Description Initializes a new instance of the SANMove object using the specified SAN string. This method may throw an error during initialization. ### Signature `init(san: String) throws` ### Parameters - **san** (String) - Required - The SAN identifier used to initialize the object. ``` -------------------------------- ### init() Source: https://nsstudent.dev/fischer-core/documentation/fischercore/basicpgnparser/init%28%29 Initializes the BasicPGNParser instance. ```APIDOC ## init() ### Description Initializes the BasicPGNParser component. ### Signature `init()` ``` -------------------------------- ### init(file:rank:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/square/init%28file%3Arank%3A%29 The initializer signature for creating an instance with a specified file and rank. ```swift init( file: File, rank: Rank ) ``` -------------------------------- ### Static ...(_:) Operator Definition Source: https://nsstudent.dev/fischer-core/documentation/fischercore/file/%27...%28_%3A%29-6wkqu The operator definition for creating a PartialRangeFrom range starting at the provided minimum value. ```swift static func ... (minimum: Self) -> PartialRangeFrom ``` -------------------------------- ### init(_:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/file/init%28_%3A%29 Initializes an instance with a given character. ```APIDOC ## init(_:) ### Description Initializes an instance using the provided character. ### Signature `init?(_ character: Character)` ``` -------------------------------- ### Accessing bitboard square via subscript Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/subscript%28_%3A%29-8nqmq The subscript allows getting or setting the Bool value for the bit at a specified square. ```swift subscript(square: Square) -> Bool { get set } ``` -------------------------------- ### init(squares:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28squares%3A%29 Initializes a new Bitboard instance using a sequence of squares. ```APIDOC ## init(squares:) ### Description Creates a bitboard from a sequence of squares. ### Signature `init(squares: S) where S : Sequence, S.Element == Square` ### Parameters - **squares** (S) - Required - A sequence of Square elements used to initialize the bitboard. ``` -------------------------------- ### subscript(_:) method signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/board/subscript%28_%3A%29-1bnls The subscript method takes a Square as an argument and returns an optional Piece, supporting both get and set operations. ```swift subscript(square: Square) -> Piece? { get set } ``` -------------------------------- ### init(rawValue:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/promotionpiece/init%28rawvalue%3A%29 Initializes a PromotionPiece instance from a raw String value. ```APIDOC ## init(rawValue:) ### Description Creates a new instance of PromotionPiece from the provided raw string value. This is a failable initializer inherited from RawRepresentable. ### Signature `init?(rawValue: String)` ### Parameters - **rawValue** (String) - The raw string value used to initialize the PromotionPiece. ``` -------------------------------- ### init(game:sanMove:considerHalfmoves:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/move/init%28game%3Asanmove%3Aconsiderhalfmoves%3A%29 Initializes a new Move object using the provided game context and SAN move notation. ```APIDOC ## init(game:sanMove:considerHalfmoves:) ### Description Initializes a new instance of a move within the context of a specific game, using Standard Algebraic Notation (SAN). ### Signature `init(game: Game, sanMove: SANMove, considerHalfmoves: Bool = true) throws` ### Parameters - **game** (Game) - Required - The current game state. - **sanMove** (SANMove) - Required - The move represented in Standard Algebraic Notation. - **considerHalfmoves** (Bool) - Optional - A flag to determine if half-moves should be considered. Defaults to true. ``` -------------------------------- ### init(queen:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/piece/init%28queen%3A%29 Initializes a new piece with the specified queen color. ```APIDOC ## init(queen:) ### Description Initializes a new piece instance with a specified queen color. ### Signature `init(queen color: PlayerColor)` ### Parameters - **color** (PlayerColor) - Required - The color of the queen piece. ``` -------------------------------- ### func enumerated() -> EnumeratedSequence Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/enumerated%28%29 Returns a sequence of pairs (n, x), where n represents a consecutive integer starting at zero, and x represents an element of the sequence. ```APIDOC ## func enumerated() ### Description Returns a sequence of pairs (n, x), where n represents a consecutive integer starting at zero, and x represents an element of the sequence. This method is inherited from `Sequence.enumerated()`. ### Signature `func enumerated() -> EnumeratedSequence` ``` -------------------------------- ### jumpToMove(_:considerHalfmoves:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/game/jumptomove%28_%3Aconsiderhalfmoves%3A%29 Moves the game history cursor to a specific move index. Values below zero rewind to the start, while values past the available history fast-forward as far as possible. ```APIDOC ## jumpToMove(_:considerHalfmoves:) ### Description Moves the game history cursor to a specific move index. ### Signature `mutating func jumpToMove(_ index: Int, considerHalfmoves: Bool = false)` ### Parameters - **index** (Int) - The target number of played moves to keep in `moveHistory`. - **considerHalfmoves** (Bool) - Whether to apply halfmove-clock validation while replaying moves. Defaults to `false`. ### Discussion Values below zero rewind to the start. Values past the available redo history fast-forward as far as possible. ``` -------------------------------- ### init(_:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/piece/init%28_%3A%29 Initializes a new instance of a piece using the provided FEN name. ```APIDOC ## init(_:) ### Description Initializes a new piece instance based on the provided FEN (Forsyth-Edwards Notation) name string. ### Signature `init?(_ fenName: String)` ### Parameters - **fenName** (String) - Required - The FEN name representing the piece. ``` -------------------------------- ### Initialize Bitboard from locations Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28locations%3A%29 Initializes a bitboard using a sequence of file and rank coordinates. ```swift init(locations: S) where S : Sequence, S.Element == (file: File, rank: Rank) ``` -------------------------------- ### init(from:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/basicpgngame/init%28from%3A%29 Initializes a new instance of BasicPGNGame by decoding data from the provided decoder. ```APIDOC ## init(from:) ### Description Initializes a new instance of BasicPGNGame by decoding data from the provided decoder. This method is inherited from the Decodable protocol. ### Signature `init(from decoder: any Decoder) throws` ### Parameters - **decoder** (any Decoder) - Required - The decoder to read data from. ``` -------------------------------- ### init(move:promotion:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/resolvedmove/init%28move%3Apromotion%3A%29 Initializes a new instance of a resolved move with the specified move and optional promotion piece. ```APIDOC ## init(move:promotion:) ### Description Creates a resolved move instance. ### Signature `init(move: Move, promotion: PromotionPiece? = nil)` ### Parameters - **move** (Move) - Required - The legal move to execute. - **promotion** (PromotionPiece?) - Optional - The promotion piece to apply when the move promotes a pawn. ``` -------------------------------- ### init(piece:location:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/board/space/init%28piece%3Alocation%3A%29 Initializes a new Board.Space instance with an optional piece and a required location. ```APIDOC ## init(piece:location:) ### Description Initializes a new instance of Board.Space. This method allows you to optionally place a piece on the space at the time of initialization. ### Signature ```swift init( piece: Piece? = nil, location: Location ) ``` ### Parameters - **piece** (Piece?) - Optional - The piece to be placed on the space. Defaults to nil. - **location** (Location) - Required - The location coordinate or identifier for the space. ``` -------------------------------- ### init(rank:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28rank%3A%29 Initializes a new Bitboard instance with a mask representing the specified rank. ```APIDOC ## init(rank:) ### Description Creates a bitboard mask for the specified rank. ### Signature `init(rank: Rank)` ### Parameters - **rank** (Rank) - Required - The rank for which to create the bitboard mask. ``` -------------------------------- ### init(location:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28location%3A%29 The initializer signature for creating a Bitboard instance at a given location. ```swift init(location: Location) ``` -------------------------------- ### init(integerLiteral:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28integerliteral%3A%29 Initializes a new Bitboard instance using a 64-bit unsigned integer literal. ```APIDOC ## init(integerLiteral:) ### Description Initializes a Bitboard instance from a 64-bit unsigned integer literal. This method is part of the ExpressibleByIntegerLiteral protocol implementation. ### Signature `init(integerLiteral value: UInt64)` ### Parameters - **value** (UInt64) - Required - The integer value used to initialize the Bitboard. ``` -------------------------------- ### init(token:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/game/gametoken/init%28token%3A%29 Initializes a GameToken with legacy string tokens indexed by Square.rawValue. ```APIDOC ## init(token:) ### Description Creates legacy string tokens. This method is marked as deprecated. ### Signature `init(token: [String])` ### Parameters - **token** ([String]) - Required - String tokens indexed by Square.rawValue. ``` -------------------------------- ### init(rawValue: UInt64) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28rawvalue%3A%29 Initializes a new Bitboard instance using a raw 64-bit unsigned integer value. ```APIDOC ## init(rawValue:) ### Description Initializes a new Bitboard instance from a raw 64-bit unsigned integer value. ### Signature `init(rawValue: UInt64)` ### Parameters - **rawValue** (UInt64) - The raw 64-bit integer value used to initialize the Bitboard. ``` -------------------------------- ### init(from:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/playercolor/init%28from%3A%29 Initializes a new instance of PlayerColor by decoding it from the provided decoder. ```APIDOC ## init(from:) ### Description Initializes a new instance of PlayerColor by decoding it from the provided decoder. This method is inherited from RawRepresentable and is available when the type conforms to Decodable and the raw value is a String. ### Signature `init(from decoder: any Decoder) throws` ### Parameters - **decoder** (any Decoder) - The decoder to read data from. ``` -------------------------------- ### init(board:playerTurn:castlingRights:enPassantTarget:halfmoves:fullmoves:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/position/init%28board%3Aplayerturn%3Acastlingrights%3Aenpassanttarget%3Ahalfmoves%3Afullmoves%3A%29 Initializes a new Position object with the provided board configuration and game state parameters. ```APIDOC ## init(board:playerTurn:castlingRights:enPassantTarget:halfmoves:fullmoves:) ### Description Initializes a new instance of a Position with the specified board state, player turn, castling rights, en passant target, and move counters. ### Signature `init(board: Board = Board(), playerTurn: PlayerColor = .white, castlingRights: CastlingRights = .all, enPassantTarget: Square? = nil, halfmoves: UInt = 0, fullmoves: UInt = 1)` ### Parameters - **board** (Board) - Optional - The initial board state. Defaults to a new Board instance. - **playerTurn** (PlayerColor) - Optional - The color whose turn it is. Defaults to .white. - **castlingRights** (CastlingRights) - Optional - The available castling rights. Defaults to .all. - **enPassantTarget** (Square?) - Optional - The square available for an en passant capture, if any. Defaults to nil. - **halfmoves** (UInt) - Optional - The number of halfmoves since the last capture or pawn advance. Defaults to 0. - **fullmoves** (UInt) - Optional - The current full move number. Defaults to 1. ``` -------------------------------- ### init(with:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/move/init%28with%3A%29 Initializes an instance with a provided UCI string. This is a failable initializer that may throw an error. ```APIDOC ## init(with:) ### Signature `init?(with uci: String) throws` ### Description Initializes a new instance using the provided Universal Chess Interface (UCI) string. This initializer is failable and may throw an error if the provided string is invalid. ``` -------------------------------- ### init(string:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/playercolor/init%28string%3A%29 Initializes a new PlayerColor instance from a provided string value. ```APIDOC ## init(string:) ### Description Initializes a new instance of PlayerColor using a string input. This is a failable initializer. ### Signature `init?(string: String)` ``` -------------------------------- ### init(position:whitePlayer:blackPlayer:variant:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/game/init%28position%3Awhiteplayer%3Ablackplayer%3Avariant%3A%29 Initializes a new game instance with the specified board position, player identifiers, and game variant. ```APIDOC ## init(position:whitePlayer:blackPlayer:variant:) ### Description Initializes a new game instance. This method sets the starting position, assigns player names, and defines the game variant. ### Signature `init(position: Position, whitePlayer: String = "", blackPlayer: String = "", variant: Variant = .standard) throws` ### Parameters - **position** (Position) - Required - The starting board position for the game. - **whitePlayer** (String) - Optional - The name or identifier for the white player. Defaults to an empty string. - **blackPlayer** (String) - Optional - The name or identifier for the black player. Defaults to an empty string. - **variant** (Variant) - Optional - The game variant to be played. Defaults to `.standard`. ### Throws - Throws an error if the initialization parameters are invalid. ``` -------------------------------- ### init(startFor:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/rank/init%28startfor%3A%29 The initializer signature for init(startFor:), requiring a PlayerColor parameter. ```swift init(startFor color: PlayerColor) ``` -------------------------------- ### init(bishop:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/piece/init%28bishop%3A%29 Initializes a new Bishop piece for the specified player color. ```APIDOC ## init(bishop:) ### Description Initializes a new instance of a Bishop piece with the provided player color. ### Signature `init(bishop color: PlayerColor)` ### Parameters - **color** (PlayerColor) - Required - The color of the player to whom the Bishop belongs. ``` -------------------------------- ### init(index:moveNumber:color:san:move:promotion:isCheckmate:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/playedsanmove/init%28index%3Amovenumber%3Acolor%3Asan%3Amove%3Apromotion%3Aischeckmate%3A%29 Initializes a new PlayedSANMove instance with the specified move details. ```APIDOC ## init(index:moveNumber:color:san:move:promotion:isCheckmate:) ### Description Creates a structured SAN entry for a played move. ### Signature ```swift init( index: Int, moveNumber: Int, color: PlayerColor, san: String, move: Move, promotion: PromotionPiece?, isCheckmate: Bool ) ``` ### Parameters - **index** (Int) - The zero-based index in `Game.moveHistory`. - **moveNumber** (Int) - The human chess move number. - **color** (PlayerColor) - The side that played the move. - **san** (String) - The SAN text for the move. - **move** (Move) - The underlying coordinate move. - **promotion** (PromotionPiece?) - The promotion piece, if any. - **isCheckmate** (Bool) - Whether the move ended the game by checkmate. ``` -------------------------------- ### init(_ pgn: String) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/movetreepgnreader/init%28_%3A%29 Initializes a new MoveTreePGNReader instance using the specified PGN (Portable Game Notation) string. ```APIDOC ## init(_:) ### Description Initializes a new instance of the MoveTreePGNReader class with the provided PGN data. ### Signature `init(_ pgn: String)` ### Parameters - **pgn** (String) - Required - The PGN string to be parsed by the reader. ``` -------------------------------- ### Initialize Bitboard from Sequence Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28squares%3A%29 Initializes a bitboard using a sequence of squares. ```swift init(squares: S) where S : Sequence, S.Element == Square ``` -------------------------------- ### init(index:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/file/init%28index%3A%29 Initializes an instance using an integer index. This is a failable initializer. ```APIDOC ## init(index:) ### Signature `init?(index: Int)` ### Description A failable initializer that creates an instance based on the provided integer index. ``` -------------------------------- ### init(tags:initialComment:tree:result:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/movetreepgn/init%28tags%3Ainitialcomment%3Atree%3Aresult%3A%29 Initializes a new MoveTreePGN instance with the specified PGN components. ```APIDOC ## init(tags:initialComment:tree:result:) ### Description Initializes a new MoveTreePGN object with optional PGN metadata and structure. ### Signature ```swift init( tags: [PGNTag : String], initialComment: [PGNComment]? = nil, tree: MoveTree? = nil, result: PGNOutcome? = nil ) ``` ### Parameters - **tags** ([PGNTag : String]) - Required - A dictionary of PGN tags. - **initialComment** ([PGNComment]?) - Optional - An array of initial comments for the PGN. - **tree** (MoveTree?) - Optional - The move tree structure. - **result** (PGNOutcome?) - Optional - The outcome of the game. ``` -------------------------------- ### init(token:) Initializer Syntax Source: https://nsstudent.dev/fischer-core/documentation/fischercore/game/gametoken/init%28token%3A%29 The initializer signature for creating legacy string tokens. ```swift init(token: [String]) ``` -------------------------------- ### init(_:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/square/init%28_%3A%29 Initializes a new instance of the object from a provided string. ```APIDOC ## init(_:) ### Signature `init?(_ string: String)` ### Description Initializes an instance of the object using the provided string. This is a failable initializer. ``` -------------------------------- ### init(file:rank:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/square/init%28file%3Arank%3A%29 Initializes a new Square instance with the specified file and rank. ```APIDOC ## init(file:rank:) ### Description Initializes a new instance of the Square class using the provided file and rank parameters. ### Signature `init(file: File, rank: Rank)` ### Parameters - **file** (File) - Required - The file coordinate for the square. - **rank** (Rank) - Required - The rank coordinate for the square. ``` -------------------------------- ### init(king:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/piece/init%28king%3A%29 Initializes a new piece instance with the specified player color. ```APIDOC ## init(king:) ### Description Initializes a piece with the specified player color. ### Signature `init(king color: PlayerColor)` ### Parameters - **color** (PlayerColor) - Required - The color of the player for the piece. ``` -------------------------------- ### init() Source: https://nsstudent.dev/fischer-core/documentation/fischercore/pgnreader/init%28%29 Initializes the PGNReader component. ```APIDOC ## init() ### Description Initializes the PGNReader instance for processing PGN data. ### Signature `init()` ``` -------------------------------- ### init() Source: https://nsstudent.dev/fischer-core/documentation/fischercore/movetreepgnparser/init%28%29 Initializes the MoveTreePGNParser instance. ```APIDOC ## init() ### Description Initializes the MoveTreePGNParser instance. This method is used to set up the parser for processing PGN data. ### Signature `init()` ``` -------------------------------- ### init(pawn:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/piece/init%28pawn%3A%29 Initializes a new piece instance with the specified player color. ```APIDOC ## init(pawn:) ### Signature `init(pawn color: PlayerColor)` ### Description Initializes a new piece instance associated with the provided `PlayerColor`. ``` -------------------------------- ### init(rook:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/piece/init%28rook%3A%29 Initializes a new piece instance with the specified rook color. ```APIDOC ## init(rook:) ### Signature `init(rook color: PlayerColor)` ### Description Initializes a piece with the specified rook color. ``` -------------------------------- ### init(turn:color:node:next:variants:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/movetree/init%28turn%3Acolor%3Anode%3Anext%3Avariants%3A%29 Initializes a new instance of the MoveTree class with the specified move details. ```APIDOC ## init(turn:color:node:next:variants:) ### Description Initializes a new MoveTree node with the provided turn number, player color, move node, optional next move, and a list of variants. ### Signature ```swift init( turn: UInt, color: PlayerColor, node: SANMove, next: MoveTree? = nil, variants: [MoveTree] = [] ) ``` ### Parameters - **turn** (UInt) - The turn number associated with this move. - **color** (PlayerColor) - The color of the player making the move. - **node** (SANMove) - The move represented as a SANMove object. - **next** (MoveTree?) - The next move in the sequence, defaults to nil. - **variants** ([MoveTree]) - A list of alternative move branches, defaults to an empty array. ``` -------------------------------- ### initialBoard() Source: https://nsstudent.dev/fischer-core/documentation/fischercore/movetreepgn/initialboard%28%29 Returns the initial board configuration as a Board object. ```APIDOC ## initialBoard() ### Description Returns the initial state of the chess board. ### Signature `func initialBoard() -> Board` ### Returns - **Board** - The initial board configuration. ``` -------------------------------- ### init() Source: https://nsstudent.dev/fischer-core/documentation/fischercore/pgngameparser/init%28%29 Initializes the PGNGameParser instance. ```APIDOC ## init() ### Description Initializes the PGNGameParser component. ### Signature `init()` ``` -------------------------------- ### init(fen:) Initializer Signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/board/init%28fen%3A%29 The initializer signature for creating a Board from a FEN string. ```swift init?(fen: String) ``` -------------------------------- ### init(pawn:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/piece/init%28pawn%3A%29 The initializer signature for creating a pawn, requiring a PlayerColor argument. ```swift init(pawn color: PlayerColor) ``` -------------------------------- ### init(move:piece:capture:enPassantTarget:kingAttackers:halfmoves:rights:promotionPiece:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/movehistoryelement/init%28move%3Apiece%3Acapture%3Aenpassanttarget%3Akingattackers%3Ahalfmoves%3Arights%3Apromotionpiece%3A%29 Initializes a new MoveHistoryElement with the specified move details and game state parameters. ```APIDOC ## init(move:piece:capture:enPassantTarget:kingAttackers:halfmoves:rights:promotionPiece:) ### Description Initializes a new instance of MoveHistoryElement, capturing the necessary state information for a move in the game history. ### Signature ```swift init( move: Move, piece: Piece, capture: Piece?, enPassantTarget: Square?, kingAttackers: Bitboard, halfmoves: UInt, rights: CastlingRights, promotionPiece: PromotionPiece? = nil ) ``` ### Parameters - **move** (Move) - The move being recorded. - **piece** (Piece) - The piece being moved. - **capture** (Piece?) - The piece captured during the move, if any. - **enPassantTarget** (Square?) - The en passant target square, if applicable. - **kingAttackers** (Bitboard) - The set of pieces attacking the king. - **halfmoves** (UInt) - The halfmove clock count. - **rights** (CastlingRights) - The castling rights state. - **promotionPiece** (PromotionPiece?) - The piece promoted to, if applicable. ``` -------------------------------- ### init(rawValue:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/file/init%28rawvalue%3A%29 Initializes a new instance from the provided raw integer value. ```APIDOC ## init(rawValue:) ### Description Initializes an instance from a raw integer value. This is inherited from the RawRepresentable protocol. ### Signature `init?(rawValue: Int)` ### Parameters - **rawValue** (Int) - The raw integer value used to initialize the instance. ``` -------------------------------- ### init(string:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/castlingrights/init%28string%3A%29 Initializes a new CastlingRights instance from a provided string. ```APIDOC ## init(string:) ### Description Initializes a new CastlingRights instance from a string representation. This is a failable initializer. ### Signature `init?(string: String)` ``` -------------------------------- ### init(stringLiteral:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/file/init%28stringliteral%3A%29 Initializes an instance using a string literal value. ```APIDOC ## init(stringLiteral:) ### Description Initializes an instance of the type using a provided string literal. This method is inherited from the ExpressibleByStringLiteral protocol. ### Signature `init(stringLiteral value: String)` ### Parameters - **value** (String) - The string literal value used to initialize the instance. ``` -------------------------------- ### init(index:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/rank/init%28index%3A%29 Initializes a new instance of Rank using the provided index. ```APIDOC ## init(index:) ### Description Initializes a new Rank instance with the specified index. This is a failable initializer. ### Signature `init?(index: Int)` ### Parameters - **index** (Int) - The index value used to initialize the Rank. ``` -------------------------------- ### init(_ sequence: S) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/castlingrights/init%28_%3A%29 Initializes a new CastlingRights instance from a sequence of CastlingRights.Right elements. ```APIDOC ## init(_ sequence: S) ### Description Creates a new CastlingRights instance by collecting elements from the provided sequence. ### Signature `init(_ sequence: S) where S : Sequence, S.Element == CastlingRights.Right` ### Parameters - **sequence** (S) - Required - A sequence of CastlingRights.Right elements used to initialize the structure. ``` -------------------------------- ### init(square:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28square%3A%29 Initializes a new bitboard mask for the specified square. ```APIDOC ## init(square:) ### Description Creates a bitboard mask for the provided `square`. ### Signature `init(square: Square)` ### Parameters - **square** (Square) - Required - The square for which to create the bitboard mask. ``` -------------------------------- ### init(piece:square:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/board/space/init%28piece%3Asquare%3A%29 Initializes a new instance of a board space with an optional piece and a required square. ```APIDOC ## init(piece:square:) ### Description Initializes a new instance of a board space. This method allows for the optional placement of a piece on a specific square. ### Signature `init(piece: Piece? = nil, square: Square)` ### Parameters - **piece** (Piece?) - Optional - The piece to be placed on the square. Defaults to nil. - **square** (Square) - Required - The square location for the space. ``` -------------------------------- ### init(castle:direction:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/move/init%28castle%3Adirection%3A%29 Initializes a move with a specified castle color and direction. ```APIDOC ## init(castle:direction:) ### Description Initializes a new move instance associated with a specific castle color and a movement direction. ### Signature `init(castle: PlayerColor, direction: File.Direction)` ### Parameters - **castle** (PlayerColor) - The color of the castle involved in the move. - **direction** (File.Direction) - The direction of the move. ``` -------------------------------- ### init(tags:game:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/basicpgngame/init%28tags%3Agame%3A%29 The initializer signature for BasicPGNGame, requiring a dictionary of PGN tags and the game content as a string. ```swift init( tags: [PGNTag : String], game: String ) ``` -------------------------------- ### init(square:) Initializer Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28square%3A%29 Creates a bitboard mask for the specified square. ```swift init(square: Square) ``` -------------------------------- ### init(side:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/castlingrights/init%28side%3A%29 Initializes a new CastlingRights instance for the specified board side. ```APIDOC ## init(side:) ### Description Initializes a new instance of CastlingRights for a given board side. ### Signature `init(side: Board.Side)` ### Parameters - **side** (Board.Side) - Required - The side of the board for which to initialize castling rights. ``` -------------------------------- ### init(_:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/outcome/init%28_%3A%29 The initializer signature for init(_:). ```swift init?(_ string: String) ``` -------------------------------- ### Initialize BasicPGNParser Source: https://nsstudent.dev/fischer-core/documentation/fischercore/basicpgnparser/init%28%29 Basic usage of the init() method to initialize the parser. ```text init() ``` -------------------------------- ### Initializer init(with:whitePlayer:blackPlayer:variant:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/game/init%28with%3Awhiteplayer%3Ablackplayer%3Avariant%3A%29 The initializer accepts a FEN string, optional player names, and a game variant, throwing an error if the configuration is invalid. ```swift init( with fen: String, whitePlayer: String = "", blackPlayer: String = "", variant: Variant = .standard ) throws ``` -------------------------------- ### init(rook:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/piece/init%28rook%3A%29 The initializer signature for creating a rook piece, requiring a PlayerColor argument. ```swift init(rook color: PlayerColor) ``` -------------------------------- ### init(color:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/castlingrights/init%28color%3A%29 Initializes a new CastlingRights object for the given player color. ```APIDOC ## init(color:) ### Description Creates castling rights for the specified player color. ### Signature `init(color: PlayerColor)` ### Parameters - **color** (PlayerColor) - Required - The color of the player for which to initialize castling rights. ``` -------------------------------- ### init(piece:location:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/board/space/init%28piece%3Alocation%3A%29 The initializer accepts an optional Piece and a required Location. ```swift init( piece: Piece? = nil, location: Location ) ``` -------------------------------- ### init(index:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/file/init%28index%3A%29 The initializer signature for init(index:). ```swift init?(index: Int) ``` -------------------------------- ### init(kind:color:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/piece/init%28kind%3Acolor%3A%29 The initializer requires a Piece.Kind and a PlayerColor to construct a new piece. ```swift init( kind: Piece.Kind, color: PlayerColor ) ``` -------------------------------- ### Initializer init(loading:moveToEnd:considerHalfmoves:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/game/init%28loading%3Amovetoend%3Aconsiderhalfmoves%3A%29 The initializer for the game instance. It accepts a PGNGame object and optional parameters for move navigation and half-move handling. ```swift init( loading pgnGame: PGNGame, moveToEnd: Bool = false, considerHalfmoves: Bool = true ) throws ``` -------------------------------- ### init(_:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/outcome/init%28_%3A%29 Initializes an Outcome instance from a provided string. ```APIDOC ## init(_:) ### Description Initializes an instance of Outcome using a String input. ### Signature `init?(_ string: String)` ``` -------------------------------- ### init(queen:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/piece/init%28queen%3A%29 The initializer signature for creating a queen piece with a specified player color. ```swift init(queen color: PlayerColor) ``` -------------------------------- ### init(fenPositions:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/pgngame/init%28fenpositions%3A%29 Initializes a new PGNGame instance with a provided array of FEN strings. This method may throw an error if the provided positions are invalid. ```APIDOC ## init(fenPositions:) ### Description Initializes a new PGNGame instance using an array of FEN (Forsyth-Edwards Notation) strings. ### Signature `init(fenPositions positions: [String]) throws` ### Parameters - **positions** ([String]) - Required - An array of strings representing the game state in FEN format. ### Throws - Throws an error if the provided FEN positions are invalid or cannot be processed. ``` -------------------------------- ### init(whitePlayer:blackPlayer:) signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/game/init%28whiteplayer%3Ablackplayer%3A%29 The initializer accepts optional string parameters for the white and black players, both defaulting to an empty string. ```swift init( whitePlayer: String = "", blackPlayer: String = "" ) ``` -------------------------------- ### Initialize Bitboard with rawValue Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28rawvalue%3A%29 The init(rawValue:) initializer takes a UInt64 value to create a new Bitboard instance. ```swift init(rawValue: UInt64) ``` -------------------------------- ### init(integerLiteral:) initializer signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28integerliteral%3A%29 The initializer signature for creating a Bitboard from a UInt64 integer literal. ```swift init(integerLiteral value: UInt64) ``` -------------------------------- ### init(rawValue:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/pgnoutcome/init%28rawvalue%3A%29 Initializes a PGNOutcome instance from a raw string value. Returns nil if the provided string does not correspond to a valid PGNOutcome. ```APIDOC ## init(rawValue:) ### Description Creates a new PGNOutcome instance from a raw string value. This method is inherited from RawRepresentable. ### Signature `init?(rawValue: String)` ### Parameters - **rawValue** (String) - Required - The raw string representation used to initialize the PGNOutcome. ### Returns - **PGNOutcome?** - An optional instance of PGNOutcome if the raw value is valid, otherwise nil. ``` -------------------------------- ### init(color:side:) Initializer Signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/castlingrights/right/init%28color%3Aside%3A%29 The initializer signature for creating a CastlingRights.Right instance. ```swift init( color: PlayerColor, side: Board.Side ) ``` -------------------------------- ### init(rank:) Initializer Syntax Source: https://nsstudent.dev/fischer-core/documentation/fischercore/bitboard/init%28rank%3A%29 The initializer takes a Rank parameter to create a bitboard mask. ```swift init(rank: Rank) ``` -------------------------------- ### init(rawValue:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/pgncolor/init%28rawvalue%3A%29 Initializes a PGNColor instance from a raw string value. ```APIDOC ## init(rawValue:) ### Description Creates a new PGNColor instance from the specified raw string value. This method is inherited from RawRepresentable. ### Signature `init?(rawValue: String)` ### Parameters - **rawValue** (String) - Required - The raw string value used to initialize the PGNColor instance. ``` -------------------------------- ### init(_:) Initializer Syntax Source: https://nsstudent.dev/fischer-core/documentation/fischercore/castlingrights/init%28_%3A%29-2y6v2 The initializer accepts a sequence of elements to create a new instance, as defined by the SetAlgebra protocol. ```swift init(_ sequence: S) where S : Sequence, Self.Element == S.Element ``` -------------------------------- ### init(color:side:) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/castlingrights/right/init%28color%3Aside%3A%29 Initializes a new instance of the CastlingRights.Right structure with the specified player color and board side. ```APIDOC ## init(color:side:) ### Description Initializes a new instance of the CastlingRights.Right structure. ### Signature ```swift init( color: PlayerColor, side: Board.Side ) ``` ### Parameters - **color** (PlayerColor) - The color of the player associated with the castling right. - **side** (Board.Side) - The side of the board associated with the castling right. ``` -------------------------------- ### init?(_ fenName: String) Source: https://nsstudent.dev/fischer-core/documentation/fischercore/piece/kind-swift.enum/init%28_%3A%29 Initializes a new Piece.Kind instance using a FEN string. Returns nil if the provided string does not correspond to a valid piece kind. ```APIDOC ## init?(_ fenName: String) ### Description Initializes a Piece.Kind from a FEN string representation. ### Signature `init?(_ fenName: String)` ### Parameters - **fenName** (String) - Required - The FEN character representing the piece kind. ### Returns - **Piece.Kind?** - An optional instance of Piece.Kind if the input is valid, otherwise nil. ``` -------------------------------- ### init(_:) Initializer Signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/file/init%28_%3A%29 The initializer signature for init(_:) accepting a Character. ```swift init?(_ character: Character) ``` -------------------------------- ### PlayerColor init(string:) signature Source: https://nsstudent.dev/fischer-core/documentation/fischercore/playercolor/init%28string%3A%29 The failable initializer for creating a PlayerColor object from a string. ```swift init?(string: String) ```