var k; var f; var x; var u; var j; var s; x = 15; u = 1; f = 0; j = 50; s = 0; while((x > 1) * (x < 30)){ x = x + u; if(x > 29){ u = -u; } if(x < 1){ u = -u; } 2 k = inkey(); if(k == 102){ f = 1; } if(k == 106){ f = 2; } if((f == 1) * ( x == 2)){ u = -u; f = 0; j = j - 2; s = s + 10; } if((f == 2) * ( x == 29)){ u = -u; f = 0; j = j - 2; s = s + 10; } cls(); lc(0, 0); log("SCORE: ", s); lc(x, 15); log("O"); if( f == 1){ lc(2, 15); log("|"); } if(f == 2){ lc(29, 15); log("|"); } sleep(j); }