import josx.platform.rcx.*;

/**
 * これまで使ってきた"車"を対象として、
 * 直進後、１回右に曲がり、停止させるプログラム
 */
class RightTurn{

   //Motor.A=モーター、Motor.C=ステアリング

  /**
   * メインメソッド
   */
  static void main(String[] args)
    throws Exception{

    int turningTime=1450;//ステアリングを切っている時間(ミリ秒)
    
    //２秒直進する
    //(その後もモーターＡは回り続ける)
    Motor.A.forward();
    Thread.sleep(2000);

    //ステアリングを右に切り、一定時間経って戻す
    Motor.C.forward();
    Thread.sleep(500);
    Motor.C.stop();
    Thread.sleep(turningTime);
    Motor.C.backward();
    Thread.sleep(500);
    Motor.C.stop();
    
    //２秒前進して、止まる
    Thread.sleep( 2000 );
    Motor.A.stop();
  }
}
