giavamachia
Class Consts

java.lang.Object
  |
  +--giavamachia.Consts

public class Consts
extends java.lang.Object


Field Summary
static int BOMB_POWER
           
static int BOMB_SPEED
           
static int DECR_TEMP
           
static int DIMX
           
static int DIMY
           
static int LASER_POWER
           
static int LASER_RANGE
           
static int LASER_SPEED
           
static int MAX_N_ROBOTS
           
static int MINE_POWER
           
static int MINE_TOP_RANGE
           
static int MISSILE_POWER
           
static int MISSILE_RANGE
           
static int MISSILE_SPEED
           
static int ROBOT_DIM
           
static long ROBOT_FIRE_DELAY
           
static int ROBOT_LOOK_RANGE
           
static int ROBOT_LOOK_SPREAD
           
static int ROBOT_MAX_SPEED
           
static int ROBOT_MAX_TEMP
           
static int ROBOT_STAMINA
           
static int ROBOT_TEMP_DECR
           
static int SPEED_FACTOR
           
 
Constructor Summary
Consts()
           
 
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
 

Field Detail

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
Constructor Detail

Consts

public Consts()
Method Detail

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