DEF FN_s
LOCAL g, option2$
PRINT "Press R to Restart or D to Draw the game"
REPEAT
g=GET
UNTIL g=68 OR g=100 OR g=82 OR g=114
IF g=68 OR g=100 THEN
option2$="Draw"
ELSE
option2$="Restart"
ENDIF
= option2$
CASE TRUE OF
WHEN x%=y%: REM tie - do nothing
WHEN x%>y%:
REM player 1 has scored a hit: lower scores for player 2
Strength2%-=C
Skill2%-=D
PRINT "Strength and skill for player 2 are now ";Strength2%;" and ";Skill2%; "respectively"
IF Strength2%<=0 THEN PRINT "Player 2 is now dead!":END:REM You might prefer to set a flag here, and not end the program directly
WHEN x%<y%:
REM player 2 has scored a hit: lower scores for player 1
Strength%-=C
Skill%-=D
PRINT "Strength and skill for player 1 are now ";Strength%;" and ";Skill%; "respectively"
IF Strength%<=0 THEN PRINT "Player 1 is now dead!":END
ENDCASE