there is actually a few ways to further optimise this program.

**WAY 1**

instead of using "if" statements to decide when to stop the program…it is possible to use the randint function whereby

randint(1,6,A) will generate A number of random integers from 1 to 6

it will be displayed in a {int 1, int 2, int 3,…} format, should you want to display it in LINE BY LINE, you can then use randint(1,6,A)->L1…then:

Disp L1(1)

Disp L1(2)

Disp L1(3)

the same can be done for B, just dat the function is now randint(1,6,B) and that you display only UP TO L1(2)

**WAY 2 AND ALSO THE MORE EXCITING BUT SLIGHTLY MORE COMPLEX WAY**

I THINK THE BIGGEST IRONY IN THIS PROGRAM IS THAT…while it may be assumed that when a 0 is shown…it just means that no dice is being rolled for that time…however, it is ironic to output "ATTACKER ROLLS" before a 0 given that the Attacker does not fundamentally roll a 0 at all

IT IS THUS POSSIBLE TO OUTPUT ONLY THE DIGITS THAT ARE BEING RANDOMLY GENERATED, AND NOT 0…

CONCEPT:

the concept is that you are actually outputing all the 3 (C,D,E) variables for A and all the 2 variables (F,G) for B…HOWEVER, YOU CAN MAKE THE ZERO DIGITS DISAPPEAR!!!! this is by outputing a blank space after outputing the digits such that the blank space covers up all the 0 digits that are not randomly generated

THis can be done by:

\\start of program

:Input "ATTACK DICE",A

:If A>0 and A<4

:Then

:Goto A

:Else

:prgrmWHATEVERNAME

:Lbl A

:Input "DEFEND DICE",B

:If B>0 and B<3

:Then

:Goto Q

:Else

:Goto A

:Lbl Q

:randint(1,6,5)->L1

\\it thus does not matter how many attack or defend dice is being INPUTED by the user…you just randomly generate 5 regardless of what and THEN DECIDE HOW MANY TO OUTPUT / DISPLAY

:ClrHome

:Output(4,1,"ATTACKER ROLLS")

:Output(5,1,L1(1))

:Output(6,1,L1(2))

:Output(7,1,L1(3))

\\there is no need to compute the deleter sequence for the first digit, since A must definitely be at least 1

:Output(6,2-abs(int(A-2.5))," ")

\\IF A IS 2 OR 3, THE HORIZONTAL VALUE WILL BE 2-0=2, the blank space is thus outputed at (6,2) and thus does not cover the SINGLE DIGIT random interger at the placeholder for the 2nd integer

\\IF A is 1, HORIZONTAL VALUE WILL BE 2-1=1, the blank space is thus at (5,1) and thus "covers" the SINGLE DIGIT random integer at the placeholder for the 2nd integer…nothing is thus displayed on the screen as opposed to 0 (since it is imprecise to say that 0 is being rolled by the ATTACKER DICE)

:Output(7,2-(abs(int(A-1.5))-1)," ")

:ClrHome

:Output(4,1,"DEFENDER ROLLS")

:Output(5,1,L1(4))

:Output(6,1,L1(5))

\\B's digits can be coded for by 4th and 5th element of the same list as A, L1

:Output(6,2-abs(int(A-2.5),L1(5))

WHOALA…I believe this to be perhaps neater and hopefully more concise and innovative and less tiring to code for, especially if you are planning to expand your program to handle a larger number of random integers or a larger number of players

ALL THE BEST TO YOUR PROGRAM!!! …=) =) =)

p.s. PLS DO CHECK MY PARENTHESIS…I DUN TINK THERE SHUD BE AN ERROR…BUT TEND TO BE CARELESS AT TIMES…=)