T - Type of vector, either 2D or 3D, implementing the Vector interfacepublic class FreeSlotAssignmentStrategy<T extends com.badlogic.gdx.math.Vector<T>> extends java.lang.Object implements SlotAssignmentStrategy<T>
FreeSlotAssignmentStrategy is the simplest implementation of SlotAssignmentStrategy. It simply go through
each assignment in the list and assign sequential slot numbers. The number of slots is just the length of the list.
Because each member can occupy any slot this implementation does not support roles.
| Constructor and Description |
|---|
FreeSlotAssignmentStrategy() |
| 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.
|
void |
updateSlotAssignments(com.badlogic.gdx.utils.Array<SlotAssignment<T>> assignments)
Updates the assignment of members to slots
|
public 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>>