Austin Allman
PortfolioBitbucketResumeContact

:{-}11.75→Xmin
:11.75→Xmax
:{-}7.75→Ymin
:7.75→Ymax
:ClrDraw
:AxesOff
:FnOff
:PlotsOff
:8000→C
:8000→D
:0→A
:0→B
:0→E
:0→F
:0→θ
:0→Z
:0→V
:0→R
:ClrHome
:Disp " "
:Disp " "
:Disp "    Yu-Gi-Oh!"
:Disp " "
:Disp "    lifepoint"
:Disp "     counter"
:Pause
:2→P
:Lbl 6
:ClrHome
:Disp " "
:Disp "    Players"
:Disp " "
:If P=2
:Disp "     > 2P","       3P","       4P"
:If P=3
:Disp "       2P","     > 3P","       4P"
:If P=4
:Disp "       2P","       3P","     > 4P"
:Lbl 8
:getKey→F
:If F=25 and P≠2
:P-1→P
:If F=34 and P≠4
:P+1→P
:If F=25 or F=34
:Goto 6
:If F=45
:Goto 3
:If F≠105
:Goto 8
:0→F
:ClrHome
:If P=3 or P=4
:Then
:7→Z
:8000→G
:End
:If P=4
:Then
:7→V
:8000→H
:End
:If P≠4 and P≠3
:Text(56,1,"+                 -                C/D                +                 -")
:If P=3 or P=4
:Text(56,1,"1                 2                C/D                3")
:If P=4
:Text(56,91,"4")
:If P=2
:Text(15,32,"Yu-Gi-Oh")
:If P≠2
:Text(13,32,"Yu-Gi-Oh")
:Text(28+V,67+V,"P4")
:Text(28-V,67-V,"P3")
:Text(28+Z,19-Z,"P1")
:If P≠2
:Text(28-Z,19+Z,"P2")
:If P=2
:Text(28,67,"P2")
:P→R
:Lbl 1
:If P≠2
:Text(35-V,63-V,G,"               ")
:If P=4
:Text(35+V,63+V,H,"               ")
:Text(35+Z,15-Z,C,"               ")
:If P=2
:Text(35,63,D,"               ")
:If P≠2
:Text(35-Z,15+Z,D,"               ")
:If E<10
:Text(1,44,"  ",E,"     ")
:If E>9
:Text(1,44,E)
:If C+D+G=0
:Goto 2
:If D+G+H=0
:Goto 2
:If G+H+C=0
:Goto 2
:If H+C+D=0
:Goto 2
:If A+B≠0
:0→F
:F+1→F
:0→A
:0→B
:getKey→θ
:If θ=105 or F=500
:Then
:Pause
:0→F
:End
:If θ=41
:Then
:ClrHome
:Prompt θ
:Disp θ
:Pause
:0→θ
:0→F
:ClrHome
:End
:If θ=45
:Goto 3
:If P=3 and θ=15
:Goto 5
:If P≠2
:Goto 4
:If θ=11 or θ=14
:Prompt A
:If θ=12 or θ=15
:Prompt B
:If θ=11
:C+A→C
:If θ=14
:D+A→D
:If θ=12
:C-B→C
:If θ=15
:D-B→D
:If θ=11 or θ=12 or θ=14 or θ=15
:ClrHome
:Goto 5
:Lbl 4
:If θ=11 or θ=12 or θ=14 or θ=15
:Then
:ClrHome
:Disp " "
:Disp " "
:Disp " "
:Disp " "
:Disp "    +      -"
:Lbl 7
:getKey→A
:If A=45
:Goto 3
:If A≠85 and A≠95
:Goto 7
:ClrHome
:End
:If A=85
:Then
:0→A
:Prompt B
:ClrHome
:End
:If A=95
:Then
:Prompt A
:ClrHome
:End
:DispGraph
:If θ=11
:C+A-B→C
:If θ=12
:D+A-B→D
:If θ=14
:G+A-B→G
:If θ=15 and P=4
:H+A-B→H
:Lbl 5
:If θ=85 and E≠0
:E-1→E
:If θ=95 and E≠99
:E+1→E
:If θ=23
:0→E
:If θ=13
:Then
:ClrHome
:Disp "1=Coin toss"
:Disp "2=Dice roll"
:Disp " "
:Prompt θ
:ClrHome
:θ*{-}1→θ
:If θ={-}1
:Then
:randInt(1,2)→θ
:If θ=1
:Disp "Heads"
:If θ=2
:Disp "Tails"
:End
:If θ={-}2
:Disp randInt(1,6)
:Pause
:ClrHome
:Goto 1
:End
:If C<0
:0→C
:If D<0
:0→D
:If G<0
:0→G
:If H<0
:0→H
:Goto 1
:Lbl 2
:0→F
:Lbl 9
:F+1→F
:If F≠30
:Goto 9
:Lbl 3
:ClrDraw
:ClrHome
:AxesOn
:0→A
:0→B
:0→C
:0→D
:0→E
:0→F
:0→G
:0→H
:0→P
:0→Z
:0→V
:0→W
:0→I
:0→J
:0→K
:0→L
:0→θ
:ClrHome