public class SimPlayer extends MobileObject implements Player
| Modifier and Type | Field and Description |
|---|---|
java.util.List<Intention> |
buffer |
double |
faceDirection |
double |
neckDirection |
int |
side |
java.lang.String |
teamName |
int |
uniformNumber |
accelerationVector, directionChange, distanceChange, speedVectorpositiondistance| Constructor and Description |
|---|
SimPlayer(java.lang.String team,
int side,
int number,
Controller controller) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAccVector(java.awt.geom.Point2D.Double accvect)
Adds the acceleration vector to the speedvector then normalizes it
|
void |
applydecay() |
void |
catchBall(double direction) |
void |
changeViewMode(int quality,
int angle) |
double |
consumeStamina(double power) |
void |
dash(int power) |
void |
dashto(int power,
double direction) |
double |
getBodyDirection() |
Controller |
getController() |
double |
getEffort() |
double |
getFaceDirection() |
double |
getNeckDirection() |
int |
getNumber() |
int |
getOppositeSide() |
double |
getRecovery() |
int |
getSide()
Returns 0 if the player is in the left team, 1 if in the right team
|
double |
getStamina() |
java.lang.String |
getTeamName() |
int |
getType()
Returns the type of the object
|
boolean |
isTeamEast() |
void |
isTeamEast(boolean is) |
void |
kick(int power,
double direction) |
void |
move(int x,
int y) |
void |
say(java.lang.String message) |
void |
score() |
void |
senseBody() |
void |
setBodyDirection(double bodydirection) |
void |
setController(Controller c) |
void |
setEffort(double effort) |
void |
setFaceDirection(double facedirection) |
void |
setNeckDirection(double neckdirection) |
void |
setNumber(int number) |
void |
setRecovery(double recovery) |
void |
setSide(int side) |
void |
setStamina(int stamina) |
void |
setTeam(java.lang.String team) |
void |
turn(double angle) |
void |
turnNeck(double angle) |
getAccelerationVector, getDirectionChange, getDistanceChange, getSpeedVector, setaccelerationVector, setSpeedVectorgetPosition, setPositiongetDistance, setDistancepublic java.lang.String teamName
public int side
public int uniformNumber
public double faceDirection
public double neckDirection
public java.util.List<Intention> buffer
public SimPlayer(java.lang.String team,
int side,
int number,
Controller controller)
public int getType()
GameObjectgetType in class GameObjectpublic int getOppositeSide()
getOppositeSide in interface Playerpublic Controller getController()
public void setController(Controller c)
public void setTeam(java.lang.String team)
public int getSide()
public void setSide(int side)
public double getBodyDirection()
public void setBodyDirection(double bodydirection)
public double getFaceDirection()
public void setFaceDirection(double facedirection)
public double getNeckDirection()
public void setNeckDirection(double neckdirection)
public void setStamina(int stamina)
public double getStamina()
public double consumeStamina(double power)
public void setEffort(double effort)
public double getEffort()
public void setRecovery(double recovery)
public double getRecovery()
public void changeViewMode(int quality,
int angle)
changeViewMode in interface Playerpublic java.lang.String getTeamName()
getTeamName in interface Playerpublic boolean isTeamEast()
isTeamEast in interface Playerpublic void isTeamEast(boolean is)
isTeamEast in interface Playerpublic void addAccVector(java.awt.geom.Point2D.Double accvect)
accvect - public void applydecay()
applydecay in class MobileObject