discard method

bool discard(
  1. List<int> indices
)

Implementation

bool discard(List<int> indices) {
  var ok = true;
  ojSort(indices); // descending

  for (var x in indices) {
    if (x >= length) {
      ok = false;
    } else {
      _cards.removeAt(x);
    }
  }
  return ok;
}