def fen_to_board_pieces(fen, piece, n=8):
    """
    :param str fen:    The FEN string describing a position (state) in a Racing Kings Chess board.
    :param str piece:  Which piece type we want to find the positions. E.g. 'K', 'k', 'B', 'b'
    :param int n:      Chess game dimension (should always be 8).

    :return:  A list consisting of n sublists, each of length n, that depict and n x n grid, where
                each entry is 0, except for the specified pieces positions, that have value 1.
    :rtype:   list[list[int]]
    """
    piece_placement, _, _, _, _, _ = fen.split()
    ranks = piece_placement.split('/')
    setup = [[0] * n for _ in range(n)]

    for rank_number, rank in enumerate(ranks):
        current_file = 0
        for info in rank:
            if info.isdigit():
                current_file += int(info)
            else:
                if info == piece:
                    setup[rank_number][current_file] = 1
                current_file += 1
    return setup