fen property

String get fen

FEN representation of the setup.

Implementation

String get fen => [
      board.fen + (pockets != null ? _makePockets(pockets!) : ''),
      turnLetter,
      _makeCastlingFen(board, castlingRights),
      if (epSquare != null) epSquare!.name else '-',
      if (remainingChecks != null) _makeRemainingChecks(remainingChecks!),
      math.max(0, math.min(halfmoves, 9999)),
      math.max(1, math.min(fullmoves, 9999)),
    ].join(' ');