giavamachia
Class Consts
java.lang.Object
|
+--giavamachia.Consts
- public class Consts
- extends java.lang.Object
|
Method Summary |
static int |
getX(int x)
It transform x in screen coordinates. |
static int |
getY(int y)
It transform x in screen coordinates. |
static java.awt.Point |
rotate(java.awt.Point p,
double angle)
It returns the coordinates of a Point relative to
a new reference system aving axes rotated by angle. |
static int |
sign(int x)
It returns the sign of x |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ROBOT_FIRE_DELAY
public static final long ROBOT_FIRE_DELAY
ROBOT_LOOK_RANGE
public static final int ROBOT_LOOK_RANGE
ROBOT_LOOK_SPREAD
public static final int ROBOT_LOOK_SPREAD
ROBOT_DIM
public static final int ROBOT_DIM
ROBOT_MAX_SPEED
public static final int ROBOT_MAX_SPEED
ROBOT_STAMINA
public static final int ROBOT_STAMINA
ROBOT_MAX_TEMP
public static final int ROBOT_MAX_TEMP
ROBOT_TEMP_DECR
public static final int ROBOT_TEMP_DECR
DIMX
public static final int DIMX
DIMY
public static final int DIMY
SPEED_FACTOR
public static final int SPEED_FACTOR
BOMB_SPEED
public static final int BOMB_SPEED
BOMB_POWER
public static final int BOMB_POWER
MINE_POWER
public static final int MINE_POWER
MINE_TOP_RANGE
public static final int MINE_TOP_RANGE
MISSILE_SPEED
public static final int MISSILE_SPEED
MISSILE_POWER
public static final int MISSILE_POWER
MISSILE_RANGE
public static final int MISSILE_RANGE
LASER_SPEED
public static final int LASER_SPEED
LASER_POWER
public static final int LASER_POWER
LASER_RANGE
public static final int LASER_RANGE
MAX_N_ROBOTS
public static final int MAX_N_ROBOTS
DECR_TEMP
public static final int DECR_TEMP
Consts
public Consts()
sign
public static final int sign(int x)
- It returns the sign of
x
- Parameters:
x - an int value- Returns:
- -1 if
x<0 1 otherwise
getX
public static final int getX(int x)
- It transform
x in screen coordinates.
- Parameters:
x - an int value- Returns:
- new abscissa relative to an axis increasing left to
right, with origin at the top left corner of
Arena
getY
public static final int getY(int y)
- It transform
x in screen coordinates.
- Parameters:
y - an int value- Returns:
- new ordinate relative to an axis increasing top down,
with origin at the top left corner of
Arena
rotate
public static final java.awt.Point rotate(java.awt.Point p,
double angle)
- It returns the coordinates of a
Point relative to
a new reference system aving axes rotated by angle.
- Parameters:
p - Point to convert.angle - angle (in radians) of rotation of new axes.- Returns:
- rotated
Point value