Package | Description |
---|---|
org.bitbrawl.foodfight.field |
Classes and interfaces representing objects and properties of the game field.
|
org.bitbrawl.foodfight.util |
Useful classes that do not directly represent field objects.
|
Modifier and Type | Method | Description |
---|---|---|
Direction |
Food.getHeading() |
Returns the direction of travel of this food piece.
|
Direction |
Player.getHeading() |
Gets the direction that this player is currently facing.
|
Modifier and Type | Method | Description |
---|---|---|
default double |
Table.getEdge(Direction side) |
Returns the edge of the table on the given side of the table.
|
Modifier and Type | Field | Description |
---|---|---|
static Direction |
Direction.EAST |
The direction with measurement 0.
|
static Direction |
Direction.NORTH |
The direction with measurement π⁄2.
|
static Direction |
Direction.SOUTH |
The direction with measurement 3π⁄2.
|
static Direction |
Direction.WEST |
The direction with measurement π.
|
Modifier and Type | Method | Description |
---|---|---|
Direction |
Direction.add(double angle) |
Adds the given amount to this direction, returning the result of the
addition.
|
Direction |
Direction.Deserializer.deserialize(com.google.gson.JsonElement json,
Type typeOfT,
com.google.gson.JsonDeserializationContext context) |
|
static Direction |
PlayerUtils.getArmDirection(Player player,
Player.Hand hand) |
Gets the direction of a player's arm.
|
Direction |
Vector.getDirection() |
Returns the direction of this vector.
|
Direction |
Direction.getOpposite() |
Returns the direction that is the opposite of this one.
|
static Direction |
Direction.random() |
Returns a randomly-generated direction.
|
Direction |
Direction.reflectAcrossX() |
Reflects this direction across the x-axis, returning the result.
|
Direction |
Direction.reflectAcrossY() |
Reflects this direction across the y-axis, returning the result.
|
Modifier and Type | Method | Description |
---|---|---|
static double |
Direction.difference(Direction alpha,
Direction beta) |
Returns the signed difference between two angles.
|
static Vector |
Vector.polar(double magnitude,
Direction direction) |
Constructs a vector with polar coordinates.
|
com.google.gson.JsonElement |
Direction.Serializer.serialize(Direction src,
Type typeOfSrc,
com.google.gson.JsonSerializationContext context) |