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 |
---|---|---|
Vector |
Locatable.getLocation() |
Returns a vector representing this object's location on the field.
|
Modifier and Type | Field | Description |
---|---|---|
static Vector |
Vector.ZERO |
The zero vector, with both an x and y of zero, pointing east.
|
Modifier and Type | Method | Description |
---|---|---|
Vector |
Vector.add(Vector other) |
Adds the given vector to this one, returning the result.
|
static Vector |
Vector.average(Vector v1,
Vector v2) |
Computes the average of the two vectors.
|
static Vector |
Vector.cartesian(double x,
double y) |
Constructs a vector with Cartesian coordinates.
|
Vector |
Vector.Deserializer.deserialize(com.google.gson.JsonElement json,
Type typeOfT,
com.google.gson.JsonDeserializationContext context) |
|
Vector |
Vector.divide(double scalar) |
Divides the vector by the given scalar.
|
static Vector |
PlayerUtils.getArmLocation(Player player,
Player.Hand hand) |
Gets the location of the player's arm.
|
Vector |
Vector.getOpposite() |
Returns the vector with the same magnitude as this one, but in the
opposite direction.
|
Vector |
Vector.multiply(double scalar) |
Multiplies the vector by given scalar.
|
static Vector |
Vector.polar(double magnitude,
Direction direction) |
Constructs a vector with polar coordinates.
|
Vector |
Vector.subtract(Vector other) |
Subtracts the given vector from this one.
|
Modifier and Type | Method | Description |
---|---|---|
Vector |
Vector.add(Vector other) |
Adds the given vector to this one, returning the result.
|
static Vector |
Vector.average(Vector v1,
Vector v2) |
Computes the average of the two vectors.
|
double |
Vector.componentAlong(Vector other) |
Returns the scalar projection of this vector onto other.
|
double |
Vector.dot(Vector other) |
Performs the scalar product of this vector with the given one.
|
com.google.gson.JsonElement |
Vector.Serializer.serialize(Vector src,
Type typeOfSrc,
com.google.gson.JsonSerializationContext context) |
|
Vector |
Vector.subtract(Vector other) |
Subtracts the given vector from this one.
|