Package | Description |
---|---|
org.cell2d.space | |
org.cell2d.space.basic |
Modifier and Type | Class and Description |
---|---|
class |
ThinkerObject<T extends CellGame,U extends SpaceState<T,U,V>,V extends SpaceThinker<T,U,V>>
A ThinkerObject is a MobileObject that mimics a type of SpaceThinker by
permanently assigning to itself a SpaceThinker of that type.
|
Modifier and Type | Method and Description |
---|---|
MobileObject |
MobileObject.getLeader()
Returns this MobileObject's leader, or null if it has none.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<MobileObject> |
MobileObject.getFollowers()
Returns an unmodifiable Set view of this MobileObject's followers.
|
SafeIterator<MobileObject> |
SpaceState.mobileObjectIterator()
Returns a new SafeIterator over this SpaceState's list of MobileObjects.
|
Modifier and Type | Method and Description |
---|---|
boolean |
MobileObject.addFollower(MobileObject follower)
Adds the specified MobileObject as this MobileObject's follower if it
does not have a leader already, and if doing so would not create a loop
of followers in which MobileObjects directly or indirectly follow
themselves.
|
boolean |
MobileObject.removeFollower(MobileObject follower)
Removes the specified MobileObject as this MobileObject's follower if
this MobileObject is its leader.
|
void |
MobileObject.setLeader(MobileObject leader)
Sets this MobileObject's leader to the specified one.
|
Modifier and Type | Class and Description |
---|---|
class |
BasicThinkerObject
A BasicThinkerObject is a type of ThinkerObject that mimics a
BasicSpaceThinker, which has no special capabilities.
|