T - Type of vector, either 2D or 3D, implementing the Vector interfacepublic abstract class BoundedSlotAssignmentStrategy<T extends com.badlogic.gdx.math.Vector<T>> extends java.lang.Object implements SlotAssignmentStrategy<T>
BoundedSlotAssignmentStrategy is an abstract implementation of SlotAssignmentStrategy that supports roles.
Generally speaking, there are hard and soft roles. Hard roles cannot be broken, soft roles can.
This abstract class provides an implementation of the calculateNumberOfSlots method that
is more general (and costly) than the simplified implementation in FreeSlotAssignmentStrategy. It scans the assignment
list to find the number of filled slots, which is the highest slot number in the assignments.
| Constructor and Description |
|---|
BoundedSlotAssignmentStrategy() |
| Modifier and Type | Method and Description |
|---|---|
int |
calculateNumberOfSlots(com.badlogic.gdx.utils.Array<SlotAssignment<T>> assignments)
Calculates the number of slots from the assignment data.
|
void |
removeSlotAssignment(com.badlogic.gdx.utils.Array<SlotAssignment<T>> assignments,
int index)
Removes the slot assignment at the specified index.
|
abstract void |
updateSlotAssignments(com.badlogic.gdx.utils.Array<SlotAssignment<T>> assignments)
Updates the assignment of members to slots
|
public abstract void updateSlotAssignments(com.badlogic.gdx.utils.Array<SlotAssignment<T>> assignments)
SlotAssignmentStrategyupdateSlotAssignments in interface SlotAssignmentStrategy<T extends com.badlogic.gdx.math.Vector<T>>public int calculateNumberOfSlots(com.badlogic.gdx.utils.Array<SlotAssignment<T>> assignments)
SlotAssignmentStrategycalculateNumberOfSlots in interface SlotAssignmentStrategy<T extends com.badlogic.gdx.math.Vector<T>>public void removeSlotAssignment(com.badlogic.gdx.utils.Array<SlotAssignment<T>> assignments, int index)
SlotAssignmentStrategyremoveSlotAssignment in interface SlotAssignmentStrategy<T extends com.badlogic.gdx.math.Vector<T>>