var my; var ex; var ey; var ef; var key; var score; my = 23; ex = -1; score = 0; while(1){ cls(); key = inkey(); if (key == 32){ my = my - 1; } else{ my = my + 1; } if(my > 23){ my = 23; } if (my < 0){ my = 0; } lc(15, my); log("|"); if((ex == -1) + (ex == 24)){ ey = rnd(24); ef = rnd(2); if(ef == 0){ ex = 0; } else{ ex = 23; } } if(ef == 0){ ex = ex + 1; } else{ ex = ex - 1; } lc(ex, ey); log("-"); if((ex == 15) * (my == ey)){ lc(15, my); log("@"); score = score + 1; } lc(0, 0); log("score:"); log(score); if (score == 3){ lc(12, 11); log("CLEAR!!"); sleep(3000); break; } sleep(200); }
バージョンが上がるにつれて、どんどんゲームらしくなっていって凄い! "|"の動きが独特で、うまく"-"に当てるのが難しいです……!