input: Write a python function to generate all permutations of ship components using binary choices.
  assert generate_ships([0, 1], 0, []) == [[0, 0], [0, 1], [1, 0], [1, 1]]
  assert generate_ships([0, 1, 2], 0, []) == [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 1], [1, 0, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1]]
  assert generate_ships([0], 0, []) == [[0, 0], [0, 1]]
output: def generate_ships(components, idx, current):
      if idx == len(components):
          return [current]
      return generate_ships(components, idx + 1, current + [0]) + generate_ships(components, idx + 1, current + [1])