Enjoy programming more!
Kidspod is a post site which supports young programmers.
First step to join us.
Register as a member
For members

2017/09/23 18:53:42

MixJuice GET URL : kidspod.club/mj/361

061

  • No registered tag exist.

SOURCE CODE

var x;
var y;
var flag_x;
var flag_y;
x = 31;
y = 0;
flag_x = 1;
flag_y = 0;
while(1){
 cls();
 if(flag_x == 0){
  x = x + 1;
  if(x == 31){
   flag_x = 1;
   x = x - 1;
  }
 }
 else{
  x = x - 1;
  if(x == 0){
   flag_x = 0;
   x = x + 1;
  }
 }
 if(flag_y == 0){
  y = y + 1;
  if(y == 23){
   flag_y = 1;
    y = y -1;
  }
 }
 else{
  y = y - 1;
  if(y == 0){
   flag_y = 0;
   y = y + 1;
  }
 }
 lc(x, y);
 log("o");
 sleep(200);
} 

COMMENT