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/19 20:09:50

MixJuice GET URL : kidspod.club/mj/343

055

  • No registered tag exist.

SOURCE CODE

cls();
var x;
var y;
var flag;
var key;
x = 0;
y = 0;
flag = 0;
while(1){
 key = inkey();
 if(key == 117){
  flag = 0;
 }
 if(key == 100){
  flag = 1;
 }
 if(key == 99){
  break;
 }
 if(flag == 0){
  lc(x ,y);
  log("-");
 }
 if(flag == 1){
  lc(x, y);
  log("_");
 }
 x = x + 1;
 if(x >= 31){
  x = 0;
  y = y + 1;
 }
 if(y >= 23){
  y = 0;
 }
 sleep(50);
}
cls();
lc(12, 11);
log("CLEAR!")

COMMENT