lejos.localization
Class Move
java.lang.Object
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.
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 |
angle
public float angle
distance
public float distance
Move
public Move(float angle,
float distance)
- Create the move from an angle and a distance
- Parameters:
angle
- the angle to turndistance
- the distance to travel
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