C# Class SLAMBot.Engine.FakeRobot

An in-memory simulated robot.
Inheritance: IRobot
Afficher le fichier Open project: Amichai/SLAM-Code Class Usage Examples

Méthodes publiques

Méthode Description
FakeRobot ( EnvironmentMap map ) : System

Creates a fake robot that plays in the given map.

Move ( int steps, System.Action callback ) : void

Moves the robot forwards or backwards.

Rotate ( int degrees, System.Action callback ) : void

Rotates the robot in place.

SonarPing ( Action callback ) : void

Sends a SONAR ping.

Step ( ) : void

Runs a single step of the robot's simulation. This method should be called repeatedly.

Teleport ( Location destination ) : void

Instantly teleports the robot to an arbitrary location.

Private Methods

Méthode Description
MotionIterator ( int steps, System.Action callback ) : IEnumerator
RotationIterator ( int degrees, System.Action callback ) : IEnumerator

Method Details

FakeRobot() public méthode

Creates a fake robot that plays in the given map.
public FakeRobot ( EnvironmentMap map ) : System
map EnvironmentMap
Résultat System

Move() public méthode

Moves the robot forwards or backwards.
public Move ( int steps, System.Action callback ) : void
steps int The (signed) number of units to move.
callback System.Action A callback to call when the movement completes.
Résultat void

Rotate() public méthode

Rotates the robot in place.
public Rotate ( int degrees, System.Action callback ) : void
degrees int The number of degrees to rotate by.
callback System.Action A callback to call when the rotation completes.
Résultat void

SonarPing() public méthode

Sends a SONAR ping.
public SonarPing ( Action callback ) : void
callback Action
Résultat void

Step() public méthode

Runs a single step of the robot's simulation. This method should be called repeatedly.
public Step ( ) : void
Résultat void

Teleport() public méthode

Instantly teleports the robot to an arbitrary location.
public Teleport ( Location destination ) : void
destination Location The location to move to. This location must be unoccupied.
Résultat void