This code tracks life in games like Yu-Gi-Oh and Magic. It can handle 2-4 players, and the menu will adapt to whatever the amount of players needed is. The Menu( command can be replaced with anything else, as long as it is still user friendly. I am going for the lowest size, because speed is not an issue.
Code:
Code:
ClrHome
Input "Starting Life: ",X
Repeat 2≤P and P≤4
Input "Players: ",P
End
{X,X,X(P≥3),X(P=4)}→L₁
Lbl M
ClrHome
If P=2
Menu("Life Tracker","P1: "+eval(L₁(1)),1,"P2: "+eval(L₁(2)),2,"Quit",Q
If P=3
Menu("Life Tracker","P1: "+eval(L₁(1)),1,"P2: "+eval(L₁(2)),2,"P3: "+eval(L₁(3)),3,"Quit",Q
If P=4
Menu("Lifer Tracker","P1: "+eval(L₁(1)),1,"P2: "+eval(L₁(2)),2,"P3: "+eval(L₁(3)),3,"P4: "+eval(L₁(4)),4,"Quit",Q
Lbl 1
Input eval(L₁(1)),Str1
expr(toString(L₁(1))+Str1)→L₁(1)
Goto M
Lbl 2
Input eval(L₁(2)),Str1
expr(toString(L₁(2))+Str1)→L₁(2)
Goto M
Lbl 3
Input eval(L₁(3)),Str1
expr(toString(L₁(3))+Str1)→L₁(3)
Goto M
Lbl 4
Input eval(L₁(4)),Str1
expr(toString(L₁(4))+Str1)→L₁(4)
Goto M
Lbl Q
Stop