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

2017/11/28 14:40:28

MixJuice GET URL : kidspod.club/mj/434

087

  • No registered tag exist.

SOURCE CODE

var x;
var y;
var key;
var v;
x = 1;
y = 4;
v = 0;

while(1){
 key = inkey();
 if((key == 28) * (v == 0)){
  if(x > 0){
   x = x - 1;
  }
 }
 if((key == 29) * (v == 0)){
  if(x < 30){
   x = x + 1;
  }
 }
 if((key == 30) * (v == 0)){
  y = y - 4;
 }
 if((key == 31) * (v == 0)){
  v = 1;
 }
 if(v > 0){
  y = y + 1;
  v = v + 1;
  if(v > 4){
   v = 0;
  }
 }

 cls();
 lc(0, 5);
 log("================================");
 lc(0, 9);
 log("================================");
 lc(0, 13);
 log("================================");
 lc(0, 17);
 log("================================");
 lc(0, 21);
 log("================================");
 lc(x, y);
 log("K");

 
 sleep(500);
}

COMMENT