public class Chair extends PhysicalObject
Modifier and Type | Field and Description |
---|---|
private HumanAgent |
agent
The agent on the chair.
|
private Position |
entryPosition
The position in front of the chair.
|
private double |
width
The width of the chair.
|
shape
position
map
Constructor and Description |
---|
Chair(Position position,
Position entryPosition,
double width)
Creates a chair at a certain
Position with a certain width. |
Modifier and Type | Method and Description |
---|---|
Position |
getEntryPosition()
Gets the entry
Position . |
double |
getWidth()
Gets the width of the chair.
|
boolean |
isOccupied()
Indicates if the chair is occupied.
|
void |
setOccupied(HumanAgent agent)
Occupies the chair with an agent.
|
contains, contains, generatePosition, generatePosition, generatePositions, generatePositions, getCorners, getVectorToPosition, isCollision, isLineCollision, toString
getDistance, getPosition
isDestroyed
private HumanAgent agent
private Position entryPosition
private final double width
public Position getEntryPosition()
Position
.public double getWidth()
public boolean isOccupied()
public void setOccupied(HumanAgent agent)
agent
- The agent.