lejos.localization
Class Move

java.lang.Object
  extended by lejos.localization.Move

public class Move
extends Object

Represents a robot move consisting of a drive forward and a turn Supports generating of a random move.

Author:
Lawrie Griffiths

WARNING: THIS CLASS IS SHARED BETWEEN THE classes AND pccomms PROJECTS. DO NOT EDIT THE VERSION IN pccomms AS IT WILL BE OVERWRITTEN WHEN THE PROJECT IS BUILT.

Field Summary
 float angle
           
 float distance
           
 
Constructor Summary
Move(float angle, float distance)
          Create the move from an angle and a distance
 
Method Summary
static Move randomMove()
          Generate a random move.
static void setMaxDistance(float distance)
          Set the maximum distance for a random move
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

angle

public float angle

distance

public float distance
Constructor Detail

Move

public Move(float angle,
            float distance)
Create the move from an angle and a distance

Parameters:
angle - the angle to turn
distance - the distance to travel
Method Detail

randomMove

public static Move randomMove()
Generate a random move.

Returns:
the generated move

setMaxDistance

public static void setMaxDistance(float distance)
Set the maximum distance for a random move

Parameters:
distance - the maximum distance