         self._undoHistory = []
         self.board = Board()
         self.playerTurn = .White
+        self.castlingAvailability = .Starting
         self.mode = mode
     }
 

            }
        case .King(let color):
            if color.isWhite {
                whiteKingHasMoved = true
            } else {
                blackKingHasMoved = true
            }
            if /* Castle */ abs(move.fileChange) == 2 {
                let rank = move.start.rank

    /// The current player's turn.
    public private(set) var playerTurn: PlayerTurn

    /// The castling availability.
    public private(set) var castlingAvailability: CastlingAvailability

    /// The game's mode.
    public var mode: Mode
