makeAllocations

open override fun makeAllocations(amountNeeded: Int, resourceList: List<Resource>): Map<Resource, Int>

The method assumes that the provided list of resources has enough units available to satisfy the needs of the request.

Return

the amount to allocate from each resource as a map

Parameters

amountNeeded

the amount needed from resources

resourceList

list of resources to be allocated from