Please, use the new Blupi.org website for downloading freely all games.
Home CeeBot Blupi BuzzingCars CoLoBoT
Deutsch
English
Français
 
 
 
 
 
Motoren Zurück
extern void object::Motor( )
{
  while ( true )
  {
    object spot;
    float dir;

    spot = radar(WayPoint);
    if ( spot == null )  // nichts mehr?
    {
      motor(0, 0);  // stop
      break;  // verlässt die Schleife
    }

    dir = direction(spot.position);
    if ( dir < 0 )  // rechts?
    {
      motor(1, 1+dir/90);
    }
    else   // links?
    {
      motor(1-dir/90, 1);
    }
  }
}