|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use WorldObject | |
---|---|
appletbots | |
appletbots.balls | |
appletbots.directedballs | |
appletbots.friendly | |
appletbots.gatherers | |
appletbots.spreadout | |
appletbots.swarm | |
appletbots.tag |
Uses of WorldObject in appletbots |
---|
Subclasses of WorldObject in appletbots | |
---|---|
class |
Agent
This class represents an Agent in a appletbots world. |
class |
CarriableObject
This class represents an object that can be picked up in the appletbots world. |
class |
CarrierAgent
This class represents an agent that can pick up objects in the appletbots world. |
class |
RandomAgent
This is an agent that doesn't really react to stimuli in the world, it simply accelerates in a random direction. |
Fields in appletbots declared as WorldObject | |
---|---|
protected WorldObject |
World.selectedObject
The object that is currently selected |
Methods in appletbots that return WorldObject | |
---|---|
WorldObject |
World.getClosestObjectOfType(Agent agent,
java.lang.Class type)
Returns the closest object of the given type to the given agent that is seen by the agent |
WorldObject |
CollisionException.getCollidee()
Returns the collidee. |
WorldObject |
CollisionException.getCollider()
Returns the collider. |
WorldObject |
WorldObjectData.getObject()
Returns the object |
protected WorldObject |
World.getObjectAt(int x,
int y)
Returns the object at the given x and y coordinates. |
Methods in appletbots with parameters of type WorldObject | |
---|---|
void |
World.addObject(WorldObject object)
Adds an object to a random position in the world. |
void |
World.addObject(WorldObject object,
Point location,
Vector velocity)
Adds an object to the world at the given position with the given initial velocity |
void |
World.addObject(WorldObject object,
Vector velocity)
Adds an object to a random position in the world with the given initial velocity |
void |
WorldObject.collidedWith(WorldObject object)
Informs the object that it has been in a collision |
protected WorldObjectData |
World.getData(WorldObject object)
Returns the location and velocity data for the given object |
protected double |
World.getDistanceBetweenObjects(WorldObject a,
WorldObject b)
Returns the distance between the two objects |
Vector |
World.getVectorToObject(WorldObject a,
WorldObject b)
Returns a vector from the first object to the second object. |
Vector |
World.getVelocity(WorldObject object)
Returns the velocity for the given object |
java.util.Comparator |
World.objectDistanceComparator(WorldObject object)
Returns a comparator to sort other objects by their distance to the given object |
protected void |
World.paintObject(WorldObject object,
java.awt.Graphics g)
Paints an individual object in the world |
void |
World.removeObject(WorldObject object)
Removes an object from the world |
void |
World.selectObject(WorldObject object)
Selects the given object |
Constructors in appletbots with parameters of type WorldObject | |
---|---|
CollisionException(WorldObject collider,
WorldObject collidee)
Creates a new CollisionException with the given collider and collidee |
|
WorldObjectData(Point location,
Vector velocity,
WorldObject object)
Constructs a new WorldObjectData with the given location and velocity values for the given object |
Uses of WorldObject in appletbots.balls |
---|
Subclasses of WorldObject in appletbots.balls | |
---|---|
class |
Ball
The class represents a ball in the appletbots world |
class |
Kicker
A kicker agent chooses a visible ball at random and accelerates towards it. |
Uses of WorldObject in appletbots.directedballs |
---|
Subclasses of WorldObject in appletbots.directedballs | |
---|---|
class |
DirectedKicker
A directed kicker agent chooses a visible ball at random and tries to "kick" it so that the ball will move in the the bot's goal direction. |
Uses of WorldObject in appletbots.friendly |
---|
Subclasses of WorldObject in appletbots.friendly | |
---|---|
class |
FriendlyAgent
A friendly agent looks at all the other agents he can see and randomly selects one to be his friend. |
Uses of WorldObject in appletbots.gatherers |
---|
Subclasses of WorldObject in appletbots.gatherers | |
---|---|
class |
Food
The class represents a piece of food in the appletbots world |
class |
Gatherer
A gatherer agent chooses the closest visible piece of food that is currently not being carried by anyone (and is not already in the agent's home base) and accelerates towards it. |
Methods in appletbots.gatherers with parameters of type WorldObject | |
---|---|
boolean |
GatherersWorld.isInHome(WorldObject object,
boolean bottomRightTeam)
Returns whether or not the given object is in the home base zone of team specified by the bottomRightTeam boolean parameter |
Uses of WorldObject in appletbots.spreadout |
---|
Subclasses of WorldObject in appletbots.spreadout | |
---|---|
class |
SpreadOutAgent
A spread-out agent looks at its neighbors, and accelerates to a position to maximize the distance to his neighbors. |
Uses of WorldObject in appletbots.swarm |
---|
Subclasses of WorldObject in appletbots.swarm | |
---|---|
class |
SwarmAgent
A swarm agent looks at its neighbors, chooses a certain number of them, and accelerates in the direction of their average velocity, with a part of its acceleration being randomized. |
Uses of WorldObject in appletbots.tag |
---|
Subclasses of WorldObject in appletbots.tag | |
---|---|
class |
TagAgent
If a tag agent is "it", he will try to touch whichever non-"it" agent is closest to him. |
Methods in appletbots.tag with parameters of type WorldObject | |
---|---|
void |
TagAgent.collidedWith(WorldObject object)
Informs the object that it has been in a collision |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |