var gun_y; var key; var beam_x; var beam_y; gun_y = 12; beam_x = 0; beam_y = 0; while(1){ key = inkey(); if((key == 30) * (gun_y > 1)){ gun_y = gun_y - 1; } if((key == 31) * (gun_y < 22)){ gun_y = gun_y + 1; } if((key == 32) * (beam_x == 0)){ beam_x = 1; beam_y = gun_y; } if(beam_x != 0){ beam_x = beam_x + 4; } if(beam_x > 31){ beam_x = 0; } cls(); lc(0, gun_y); log("}") if(beam_x != 0){ lc(beam_x, beam_y); log("-"); } sleep(30); }