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, speedVector
position
distance
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, setSpeedVector
getPosition, setPosition
getDistance, setDistance
public 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()
GameObject
getType
in class GameObject
public int getOppositeSide()
getOppositeSide
in interface Player
public 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 Player
public java.lang.String getTeamName()
getTeamName
in interface Player
public boolean isTeamEast()
isTeamEast
in interface Player
public void isTeamEast(boolean is)
isTeamEast
in interface Player
public void addAccVector(java.awt.geom.Point2D.Double accvect)
accvect
- public void applydecay()
applydecay
in class MobileObject