[[2006b/A6/R Room]]

*「弥」のプログラム [#v6b1283a]
 #define pen_down OnRev(OUT_A);Wait(100);Off(OUT_A)
 #define pen_up OnFwd(OUT_A);Wait(100);Off(OUT_A)

 #define move_up OnFwd(OUT_B+OUT_C)
 #define move_down OnRev(OUT_B+OUT_C)
 #define move_right OnFwd(OUT_B);OnRev(OUT_C)
 #define move_left OnFwd(OUT_C);OnRev(OUT_B)
 #define move_stop Float(OUT_B+OUT_C)
 #define  st Off(OUT_B+OUT_C)
 
 #define time_a 50
 #define time_b 25
 #define time_c 40
 #define time_d 50
 #define time_e 10
 #define time_f 40
 #define time_g 40
 #define time_h 70
 #define time_i 100
 #define time_j 20

 sub turn_right()
 { move_right;
 Wait(89);
 }
 sub turn_left()
 { move_left;
 Wait(89);
 }
 
 task main()
 {
  pen_down;
  move_up;
  Wait(time_a);
  turn_right();
  move_up;
  Wait(time_b);
  st;
  pen_up;
 Wait(100);
  turn_right();
  move_up;
  Wait(time_a);
  st;
  pen_down;
  Wait(100);
  move_down;
  Wait(time_a);
  st;
  pen_up;
 Wait(100);
  move_up;
  Wait(time_a);
  st;
  turn_left();
  st;
  pen_down;
 Wait(100);
  move_up;
  Wait(time_b);
  st;
  turn_left();
  Wait(100);
  move_up;
  Wait(time_c);
  st;
  turn_right();
  Wait(100);
  move_up;
  Wait(time_d);
  move_right;
  Wait(90);
  st;
  Wait(100);
  move_up;
  Wait(time_e);
  move_stop;
  pen_up;
  Wait(200);
  move_down;
  Wait(time_e);
  st;
  move_left;
  Wait(120);
  repeat(2){
  turn_left();
  }
  st;
  Wait(100);
  move_up;
  Wait(time_b+time_b+time_d+20);
  move_stop;
  Wait(100);
  turn_right();
  Wait(100);
  move_up;
  Wait(time_f);
  move_stop;
  Wait(100);
  move_right;
  Wait(100);
  st;
  Wait(200);
  pen_down;
  Wait(100);
  move_up;
  Wait(time_g);
  move_stop;
  Wait(100);
  pen_up;
  Wait(100);
  move_down;
  Wait(50);
  st;
  Wait(100);
  move_left;
  Wait(100);
  st;
  Wait(200);
  pen_down;
  Wait(100);
  move_up;
  Wait(time_h);
  st;
  pen_up;
  Wait(100);
  move_down;
  Wait(35);
  st;
  Wait(100);
  turn_right();
  st;
  Wait(100);
  pen_down;
  Wait(100);
  move_up;
  Wait(time_i);
  st;
  move_right;
  Wait(100);
  st;
  Wait(100);
  move_up;
  Wait(time_e);
  move_stop;
  pen_up;
  Wait(100);
  move_down;
  Wait(time_e);
  st;
  move_left;
  Wait(100);
  repeat(2)
  {
  turn_left() ;
  }
  Wait(100);
  move_up;
  Wait(80);
  st;
  turn_left();
  Wait(100);
  move_up;
  Wait(50);
  st;
  move_left;
  Wait(70);
  st;
  Wait(100);
  pen_down;
  Wait(100);
  move_up;
  Wait(time_j);
  move_stop;
  pen_up;
  Wait(100);
  move_down;
  Wait(time_j);
  st;
  move_right;
  Wait(70);
  repeat(2)
  {
  turn_right();
  }
  Wait(100);
  move_up;
  Wait(100);
  st;
  move_right;
  Wait(70);
  st;
  Wait(100);
  pen_down;
  Wait(100);
  move_up;
  Wait(time_j);
  move_stop;
  pen_up;
  Wait(100);
  move_right;
  Wait(100);
  move_up;
  Wait(200);
  move_stop;
  }

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS