Refer to the following program.
ACLS:GPAGE 0,4:GFILL 0,0,15,15,#YELLOW
SPSET 0,0:SPOFS 0,150,200,0
SPSCALE 0,100/16,1
C=0:NHP=100:HP=100
WHILE TRUE
VSYNC 1
IF C==0 THEN NHP=RND(101)
C=(C+1)MOD 60
IF HP!=NHP THEN HP=HP+SGN(NHP-HP)
LOCATE 19,28,0
?FORMAT$("HP: %03D / 100",HP);
SPSCALE 0,HP/16,1
WEND
1そうだね 未プレイ