bot
Class Heading

java.lang.Object
  extended bybot.Heading

public class Heading
extends Object


Field Summary
static int EAST
           
static int NORTH
           
static int SOUTH
           
static int WEST
           
 
Constructor Summary
Heading()
           
 
Method Summary
static double dist(Point s1, Point s2)
           
static double dist(Square s1, Square s2)
           
static int dx(int heading)
           
static int dy(int heading)
           
static int flip(int heading)
           
static int left(int heading)
           
static Point nextPoint(Point p, int heading)
          From given point, go dir in the given direction
static Point nextPoint(Point p, int heading, int dist)
           
static int randomDirection()
           
static int randomTurn(int heading)
           
static int right(int heading)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORTH

public static final int NORTH
See Also:
Constant Field Values

EAST

public static final int EAST
See Also:
Constant Field Values

SOUTH

public static final int SOUTH
See Also:
Constant Field Values

WEST

public static final int WEST
See Also:
Constant Field Values
Constructor Detail

Heading

public Heading()
Method Detail

flip

public static int flip(int heading)

randomDirection

public static int randomDirection()

randomTurn

public static int randomTurn(int heading)

dx

public static int dx(int heading)

dy

public static int dy(int heading)

nextPoint

public static Point nextPoint(Point p,
                              int heading)
From given point, go dir in the given direction


nextPoint

public static Point nextPoint(Point p,
                              int heading,
                              int dist)

dist

public static double dist(Point s1,
                          Point s2)

dist

public static double dist(Square s1,
                          Square s2)

right

public static int right(int heading)

left

public static int left(int heading)