Finishing the weaponry

Lbl RSB is a subroutine, which means we're go back to prgmASHMUPR. Here's the code:

PROGRAM:ASHMUPR
:..ROUTINES
:Lbl ASB
:If B<64
:r4→{r3→{r2→{r1→{B+1→B*4+L4-4}+1}+1}+1}
:End :Return
:Lbl RSB
:Copy(r1*4+L4+4,-4,B-1→B-r1*4+1)
:Return

All this does is remove the element from the list. For a full explanation, see the guide to arrays.

Now there's one last thing we need to do before the program works. Back when we finished the first we commented out all the lines importing programs that didn't exist yet. Now that we've made them, take all those extra periods out. You probably don't need a screenshot for this.

Finally, it's time to actually display the bullets. Since they're in an array, the program would have to loop through the array and display each one, but guess what—we already have one such loop set up in prgmASHMUPM. Let's just edit that to save ourselves from having to build another loop:

PROGRAM:ASHMUPM
:..MOVEMENT
:If B
:For(I,1,B)
:If {{I*4+L4-1→J}-{J-2}→{J}}>64
:sub(RSB,I-1→I)
:Else :Pt-On({I*4+L4-2→J},{J+1},Pic0)
:End
:End
:End
+ Tweet