selectResources

fun selectResources(amountNeeded: Int): List<Resource>

Uses the pool's resource selection rule to select resources from those that are available that have enough units available to satisfy the request in full. If there are insufficient resources in the pool to satisfy the full amount, then the returned list will be empty. In general, the returned list may have more units available than the requested amount.

Return

a list, which may be empty, that has resources that can satisfy the requested amount

Parameters

amountNeeded

the amount needed by a request