Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Yoker... A Yahtzee / Poker twist (newest)
#1
Code: (Select All)

$ExeIcon:'./yoker.ico'
_Title "Yoker by David Coterel"
Screen _NewImage(662, 828, 32): x = _DesktopWidth * .5 - 331: y = _DesktopHeight * .5 - 414: _ScreenMove x, y
$Resize:Smooth
Randomize (-Timer)

_Define A-Z As DOUBLE

Dim rd(10), di(10), sc(6, 42), sc1(13), sc2(10), sct(6), br(6), cards(260)

f& = _LoadFont("data\font.ttf", 16)
_Font f&: w1 = _PrintWidth(" ")

cards& = _LoadImage("data\cards.jpg", 32)
cards0& = _LoadImage("data\cards0.jpg", 32)
i1& = _LoadImage("data\ss.png", 32)
typ& = _SndOpen("data\type.wav")
rn& = _LoadImage("data\rn.png", 32)
cl& = _SndOpen("data\click.wav")
dealt& = _SndOpen("data\deal.wav")
go& = _LoadImage("data\go.png", 32)
op& = _LoadImage("data\op.png", 32)
yay& = _SndOpen("data\yay.wav")
go1& = _LoadImage("data\go1.png", 32)
shu& = _SndOpen("data\shuff.wav")
muo& = _SndOpen("data\muo.wav")
dea& = _LoadImage("data\deal.png", 32)
oom& = _LoadImage("data\oom.png", 32)
yh1& = _LoadImage("data\yh1.png", 32)
yh2& = _LoadImage("data\yh2.png", 32)
yh3& = _LoadImage("data\yh3.png", 32)

Const WHITE = _RGB32(255, 255, 255)
Const PURPLE = _RGB32(112, 48, 160)
Const BLACK = _RGB32(0, 0, 0)
Const BLUE = _RGB32(0, 0, 255)
Const RED = _RGB32(255, 0, 0)
Const YELLOW = _RGB32(255, 245, 0)
Const LGREEN = _RGB32(196, 255, 13)
Const GREEN = _RGB32(0, 255, 0)
Const GRAY = _RGB32(195, 195, 195)

_SndLoop muo&: _SndVol muo&, .5
l$ = "000102030405060708091020304050606162636465666768695949392919909192939495414247485152535455565758A0A1A2A3A4A5"
_PutImage (0, 414), op&

5 a$ = "Welcome to Yoker": a = _PrintWidth(a$)
Color LGREEN, BLACK: Locate 5, 331 - (a * .5): Print a$;
a$ = "How many players [0-6 or L(oad saved game)]: ":: a = _PrintWidth(a$)
Color LGREEN, BLACK: Locate 7, 331 - (a * .5): Print a$;
x = 331 + (a * .5): y = 7: z = 0: n$ = "": m6 = 0: Color WHITE, BLACK: _KeyClear
Loop0:
di = Int(Rnd(1) * 65): l = Int(Rnd(1) * Len(l$) * .5) + 1: ly = Val(Mid$(l$, (l * 2) - 1, 1)): lx = Val(Mid$(l$, l * 2, 1)): If Mid$(l$, (l * 2) - 1, 1) = "A" Then ly = 11
_PutImage (18 + lx * 64, 2 + ly * 64)-(66 + lx * 64, 50 + ly * 64), cards&, 0, (13 + (72 * Int(di / 13)), 10 + (66 * (di - (Int(di / 13) * 13))))
Locate y, x: Print Mid$("? ", z + 1, 1);
If c$ <> Time$ Then c$ = Time$: z = 1 - z
a$ = InKey$: m1 = _MouseInput: m4 = _MouseButton(1): m5 = _MouseButton(2): If m1 + m4 + m5 = 0 Then m6 = 1
If a$ = "" And m6 * (m4 + m5) = 0 GoTo Loop0
If m4 <> 0 Or m5 <> 0 Then a$ = Chr$(13)
Locate y, x: Print " ";
If (a$ >= "0" And a$ < "7" Or UCase$(a$) = "L") And Len(n$) < 1 Then n$ = n$ + a$: Locate y, x: Print UCase$(a$);: x = x + w1: _SndPlay cl&: m6 = 0: GoTo Loop0
If a$ = Chr$(8) And Len(n$) > 0 Then n$ = Left$(n$, Len(n$) - 1): Locate y, x: Print " ";: x = x - w1: _SndPlay cl&: m6 = 0: GoTo Loop0
If a$ <> Chr$(13) Then m6 = 0: GoTo Loop0
_SndPlay cl&: If Len(n$) = 0 Then n$ = "1": Locate y, x: Print n$;: x = x + _PrintWidth(n$): m6 = 0: GoTo Loop0
If UCase$(n$) = "L" Then _SndStop muo&: _SndClose muo&: GoTo 950
pl = Val(n$): If pl = 0 Then _SndStop muo&: _SndClose muo&: GoTo 1500

For t = 1 To pl: Color LGREEN, BLACK: Locate t + 8, 100: Print Using "Player #'s name: "; t;: _SndPlay cl&
    x = 263: y = t + 8: z = 0: n$ = "": z = 0: m6 = 0: Color WHITE, BLACK: _KeyClear
    Loop1:
    di = Int(Rnd(1) * 65): l = Int(Rnd(1) * Len(l$) * .5) + 1: ly = Val(Mid$(l$, (l * 2) - 1, 1)): lx = Val(Mid$(l$, l * 2, 1)): If Mid$(l$, (l * 2) - 1, 1) = "A" Then ly = 11
    _PutImage (18 + lx * 64, 2 + ly * 64)-(66 + lx * 64, 50 + ly * 64), cards&, 0, (13 + (72 * Int(di / 13)), 10 + (66 * (di - (Int(di / 13) * 13))))
    Locate y, x: Print Mid$("? ", z + 1, 1);
    If c$ <> Time$ Then c$ = Time$: z = 1 - z
    a$ = InKey$: m1 = _MouseInput: m4 = _MouseButton(1): m5 = _MouseButton(2): If m1 + m4 + m5 = 0 Then m6 = 1
    If a$ = "" And m6 * (m4 + m5) = 0 GoTo Loop1
    If m4 <> 0 Or m5 <> 0 Then a$ = Chr$(13)
    Locate y, x: Print " ";
    If a$ >= "a" And a$ <= "z" And Len(n$) < 13 Then n$ = n$ + a$: Locate y, x: Print a$;: x = x + w1: _SndPlay cl&: m6 = 0: GoTo Loop1
    If a$ >= "A" And a$ <= "Z" And Len(n$) < 13 Then n$ = n$ + a$: Locate y, x: Print a$;: x = x + w1: _SndPlay cl&: m6 = 0: GoTo Loop1
    If a$ >= "0" And a$ <= "9" And Len(n$) < 13 Then n$ = n$ + a$: Locate y, x: Print a$;: x = x + w1: _SndPlay cl&: m6 = 0: GoTo Loop1
    If a$ = " " And Len(n$) < 13 Then n$ = n$ + a$: Locate y, x: Print a$;: x = x + w1: _SndPlay cl&: m6 = 0: GoTo Loop1
    If a$ = Chr$(8) And Len(n$) > 0 Then n$ = Left$(n$, Len(n$) - 1): Locate y, x: Print " ";: x = x - w1: _SndPlay cl&: m6 = 0: GoTo Loop1
    If a$ <> Chr$(13) Then m6 = 0: GoTo Loop1
    _SndPlay cl&: If Len(n$) = 0 Then n$ = "Player" + Str$(t): Locate y, x: Print n$;: x = x + w1 * 8: m6 = 0: GoTo Loop1
pl$(t) = n$: Next t
If pl = 1 Then GoTo Start

Color LGREEN, BLACK: a$ = "Randomizing Players": Locate 16, 331 - (_PrintWidth(a$) * .5): Print a$;
For t = 1 To 100: d = Int(Rnd(1) * pl) + 1: b = Int(Rnd(1) * pl) + 1: PL$ = pl$(d): pl$(d) = pl$(b): pl$(b) = PL$: Next t
For t = 1 To pl: c$ = Time$
    Do
        di = Int(Rnd(1) * 65): l = Int(Rnd(1) * Len(l$) * .5) + 1: ly = Val(Mid$(l$, (l * 2) - 1, 1)): lx = Val(Mid$(l$, l * 2, 1)): If Mid$(l$, (l * 2) - 1, 1) = "A" Then ly = 11
        _PutImage (18 + lx * 64, 2 + ly * 64)-(66 + lx * 64, 50 + ly * 64), cards&, 0, (13 + (72 * Int(di / 13)), 10 + (66 * (di - (Int(di / 13) * 13))))
    Loop Until c$ <> Time$
Locate 8 + t, 400: Color WHITE: Print t;: Color GREEN: Print pl$(t): _SndPlay cl&: Next t

Start:
a$ = "Press any key to begin"
x = 331 - (_PrintWidth(a$) * .5): y = 19: z = 0: z = 0: m6 = 0: Color RED, BLACK: _KeyClear
Loop2:
di = Int(Rnd(1) * 65): l = Int(Rnd(1) * Len(l$) * .5) + 1: ly = Val(Mid$(l$, (l * 2) - 1, 1)): lx = Val(Mid$(l$, l * 2, 1)): If Mid$(l$, (l * 2) - 1, 1) = "A" Then ly = 11
_PutImage (18 + lx * 64, 2 + ly * 64)-(66 + lx * 64, 50 + ly * 64), cards&, 0, (13 + (72 * Int(di / 13)), 10 + (66 * (di - (Int(di / 13) * 13))))
Locate y, x: If z = 0 Then Print a$;: Else Print Spc(Len(a$));
If c$ <> Time$ Then c$ = Time$: z = 1 - z: _SndPlay cl&
m1 = _MouseInput: m4 = _MouseButton(1): m5 = _MouseButton(2): If m1 + m4 + m5 = 0 Then m6 = 1
If InKey$ = "" And m6 * (m4 + m5) = 0 GoTo Loop2
cpl = 0: bmus = 0
_SndStop muo&: _SndClose muo&

If _FileExists("data\hscore.txt") = 0 Then 10
Open "i", #2, "Data\hscore.txt"
Input #2, hs$
Input #2, hs
Close #2

10 Rem Start Game
x = 0
15 y = 0: cpl = cpl + 1: If cpl > pl Then cpl = 1
For t = 1 To 42: If sc(cpl, t) = 0 Then y = 1
Next t: If y <> 1 Then x = x + 1
If x > pl Then GoTo 1500
If y <> 1 GoTo 15
_PutImage (0, 0), i1&
For t = 0 To 9: For y = 0 To 2
        Line (15 - y + (t * 64), 744 - y)-(y + 65 + (t * 64), 794 + y), BLACK, B
Next y, t
For t = 0 To 260: cards(t) = 0: Next t
GoSub 3000: For t = 1 To 10: rd(t) = 1: Next t: deal = 1: GoSub 2000

20 Rem Get Mouse Input
Color BLACK, GRAY: Locate 51, 20
If deal <> 3 + br(cpl) Then Print "Use mouse to select/unselect cards, deal or enter a score.    ";: Else Print "Use the mouse to enter a score.                                ";
Do: m1 = _MouseInput + _MouseButton(1) + _MouseButton(2): Loop Until m1 = 0
Do: m1 = _MouseInput: m2 = _MouseX: m3 = _MouseY: m4 = _MouseButton(1): m5 = _MouseButton(2): Loop Until m4 = -1 Or m5 = -1
If m2 > 218 And m2 < 292 And m3 > 662 And m3 < 691 And m4 = -1 Then _SndPlay cl&: GoTo 200 'Sort Suit
If m2 > 218 And m2 < 292 And m3 > 694 And m3 < 724 And m4 = -1 Then _SndPlay cl&: GoTo 250 'Sort Rank
If m2 > 293 And m2 < 351 And m3 > 662 And m3 < 724 And m4 = -1 Then _SndPlay cl&: GoTo 300 'Select All Cards
If m2 > 18 And m2 < 650 And m3 > 741 And m3 < 803 And m4 = -1 Then _SndPlay cl&: GoTo 400 'Select / Deselect Cards
If m2 > 18 And m2 < 650 And m3 > 741 And m3 < 803 And m5 = -1 Then _SndPlay cl&: GoTo 500 'Deal Cards
If m2 > 242 And m2 < 268 And m3 > 118 And m3 < 560 And m4 = -1 Then _SndPlay cl&: GoTo 600 'Enter selection on left side
If m2 > 529 And m2 < 631 And m3 > 118 And m3 < 560 And m4 = -1 Then _SndPlay cl&: GoTo 700 'Enter selection on right side
If m2 > 473 And m2 < 567 And m3 > 16 And m3 < 42 And m4 = -1 Then _SndPlay cl&: GoTo 900 'Save Game
If m2 > 505 And m2 < 578 And m3 > 661 And m3 < 723 And m4 = -1 Then _SndPlay cl&: GoTo 1000 'Boss Mode
If m2 > 408 And m2 < 432 And m3 > 16 And m3 < 42 And m4 = -1 Then _SndPlay cl&: GoTo 1100 'Music On/Off
If m2 > 441 And m2 < 467 And m3 > 16 And m3 < 42 And m4 = -1 And pl > 1 Then _SndPlay cl&: GoTo 1200 'Skip Player
If m2 > 581 And m2 < 664 And m3 > 661 And m3 < 723 And m4 = -1 Then _SndPlay cl&: GoTo 1500 'End Game
If m2 > 575 And m2 < 646 And m3 > 16 And m3 < 42 And m4 = -1 Then _SndPlay cl&: GoTo 1600 'Help
GoTo 20

200 Rem Sort Suit
For t = 1 To 10: rd(t) = 0: x = di(t): Do Until x < 65: x = x - 65: Loop
    s(t) = x: Next t: For t = 1 To 9: For y = t + 1 To 10
        If s(y) < s(t) Then Swap s(y), s(t): Swap di(y), di(t)
Next y, t
For t = 1 To 10: di = di(t): Do Until di < 65: di = di - 65: Loop
    _PutImage (16 + ((t - 1) * 64), 745)-(64 + ((t - 1) * 64), 793), cards&, 0, (13 + (72 * Int(di / 13)), 10 + (66 * (di - (Int(di / 13) * 13))))
Next t: GoTo 20

250 Rem Sort Rank
For t = 1 To 10: rd(t) = 0
    x = di(t): Do Until x < 13: x = x - 13: Loop
s(t) = x: Next t
For t = 1 To 9: For y = t + 1 To 10
        If s(y) < s(t) Then Swap s(y), s(t): Swap di(y), di(t)
Next y, t
For t = 1 To 10: di = di(t): Do Until di < 65: di = di - 65: Loop
    _PutImage (16 + ((t - 1) * 64), 745)-(64 + ((t - 1) * 64), 793), cards&, 0, (13 + (72 * Int(di / 13)), 10 + (66 * (di - (Int(di / 13) * 13))))
Next t: GoTo 20

300 Rem Select all Cards
If deal = 3 + br(cpl) Then 20
If rd(1) + rd(2) + rd(3) + rd(4) + rd(5) + rd(6) + rd(7) + rd(8) + rd(9) + rd(10) = 10 Then 310
For t = 1 To 10: rd(t) = 1: di = di(t): Do Until di < 65: di = di - 65: Loop
    _PutImage (16 + ((t - 1) * 64), 745)-(64 + ((t - 1) * 64), 793), cards0&, 0, (13 + (72 * Int(di / 13)), 10 + (66 * (di - (Int(di / 13) * 13))))
Next t
GoTo 20
310 For t = 1 To 10: rd(t) = 0: di = di(t): Do Until di < 65: di = di - 65: Loop
    _PutImage (16 + ((t - 1) * 64), 745)-(64 + ((t - 1) * 64), 793), cards&, 0, (13 + (72 * Int(di / 13)), 10 + (66 * (di - (Int(di / 13) * 13))))
Next t
GoTo 20

400 Rem Card Select/Deselect
If deal = 3 + br(cpl) Then 20
d = Int((m2 - 12) / 64) + 1: di = di(d): Do Until di < 65: di = di - 65: Loop
rd(d) = 1 - rd(d)
If rd(d) = 1 Then _PutImage (16 + ((d - 1) * 64), 745)-(64 + ((d - 1) * 64), 793), cards0&, 0, (13 + (72 * Int(di / 13)), 10 + (66 * (di - (Int(di / 13) * 13))))
If rd(d) = 0 Then _PutImage (16 + ((d - 1) * 64), 745)-(64 + ((d - 1) * 64), 793), cards&, 0, (13 + (72 * Int(di / 13)), 10 + (66 * (di - (Int(di / 13) * 13))))
GoTo 20

500 Rem Deal Cards
If deal = 3 + br(cpl) Then 20
rd = 0: For t = 1 To 10: rd = rd + rd(t): Next t: If rd = 0 Then 20
deal = deal + 1: GoSub 2000
GoTo 20

600 Rem Enter Selections on Left Side
s = 0: x = 0: For t = 1 To 14: If m3 > 88 + (t * 32) And m3 < 110 + (t * 32) Then s = t
Next t: If s = 0 Then 20
If s = 14 Then 610
If sc(cpl, s) <> 0 Then 20
For t = 1 To 10: Do Until di(t) < 13: di(t) = di(t) - 13: Loop
    If di(t) = s - 1 Then x = x + 1
Next t: sc(cpl, s) = x * s: If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10
610 Rem Left Side Royals
If sc(cpl, s) <> 0 Then 20
For t = 1 To 10: Do Until di(t) < 13: di(t) = di(t) - 13: Loop
    If di(t) = 0 Or di(t) > 8 Then x = x + di(t) + 1
Next t: sc(cpl, s) = x: If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

700 Rem Enter Selections on Right Side
s = 0: For t = 1 To 14: If m3 > 88 + (t * 32) And m3 < 110 + (t * 32) Then s = t
Next t: If s = 0 Then 20
If m2 > 529 And m2 < 555 Then s = s + 14
If m2 > 605 And m2 < 631 Then s = s + 28
If s < 15 Then 20
If s < 29 Then On s - 14 GOTO 710, 720, 730, 740, 750, 760, 770, 780, 790, 800, 810, 820, 830, 840
On s - 28 GOTO 710, 720, 730, 740, 750, 760, 770, 780, 790, 800, 810, 820, 830, 840

710 Rem Three Pair
If sc(cpl, s) <> 0 Then 20
For t = 0 To 12: sc1(t) = 0: Next t: x = 0
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: x = x + di + 1: Next t
a1 = 0: For t = 0 To 12: a1 = a1 + Int(sc1(t) / 2): Next t
If a1 > 2 Then sc(cpl, s) = x: If s > 28 Then sc(cpl, s) = sc(cpl, s) * 2
If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

720 Rem Four Pair
If sc(cpl, s) <> 0 Then 20
For t = 0 To 12: sc1(t) = 0: Next t: x = 0
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: x = x + di + 1: Next t
a1 = 0: For t = 0 To 12: a1 = a1 + Int(sc1(t) / 2): Next t
If a1 > 3 Then sc(cpl, s) = x: If s > 28 Then sc(cpl, s) = sc(cpl, s) * 2
If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

730 Rem Four Alike
If sc(cpl, s) <> 0 Then 20
For t = 0 To 12: sc1(t) = 0: Next t: x = 0
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: x = x + di + 1: Next t
a1 = 0: For t = 0 To 12: If sc1(t) > 3 Then a1 = 1
Next t: If a1 = 1 Then sc(cpl, s) = x: If s > 28 Then sc(cpl, s) = sc(cpl, s) * 2
If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

740 Rem Five Alike
If sc(cpl, s) <> 0 Then 20
For t = 0 To 12: sc1(t) = 0: Next t: x = 0
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: x = x + di + 1: Next t
a1 = 0: For t = 0 To 12: If sc1(t) > 4 Then a1 = 1
Next t: If a1 = 1 Then sc(cpl, s) = x: If s > 28 Then sc(cpl, s) = sc(cpl, s) * 2
If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

750 Rem Six Card Flush
If sc(cpl, s) <> 0 Then 20
For t = 1 To 5: sc2(t) = 0: Next t: a1 = 0
For t = 1 To 10: di = di(t): Do Until di < 65: di = di - 65: Loop
    If di < 13 Then sc2(1) = sc2(1) + 1
    If di > 12 And di < 26 Then sc2(2) = sc2(2) + 1
    If di > 25 And di < 39 Then sc2(3) = sc2(3) + 1
    If di > 38 And di < 52 Then sc2(4) = sc2(4) + 1
    If di > 51 Then sc2(5) = sc2(5) + 1
    Next t: For t = 1 To 5: If sc2(t) > 5 Then a1 = 1
Next t: If a1 = 1 Then sc(cpl, s) = 200: If s > 28 Then sc(cpl, s) = 400
If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

760 Rem Six Straight
If sc(cpl, s) <> 0 Then 20
a1 = 0: For t = 0 To 12: sc1(t) = 0: Next t
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: Next t
For t = 0 To 7: If sc1(0 + t) > 0 And sc1(1 + t) > 0 And sc1(2 + t) > 0 And sc1(3 + t) > 0 And sc1(4 + t) > 0 And sc1(5 + t) > 0 Then a1 = 1
Next t: If a1 = 1 Then sc(cpl, s) = 300: If s > 28 Then sc(cpl, s) = sc(cpl, s) * 2
If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

770 Rem Seven Straight
If sc(cpl, s) <> 0 Then 20
a1 = 0: For t = 0 To 12: sc1(t) = 0: Next t
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: Next t
For t = 0 To 6: If sc1(0 + t) > 0 And sc1(1 + t) > 0 And sc1(2 + t) > 0 And sc1(3 + t) > 0 And sc1(4 + t) > 0 And sc1(5 + t) > 0 And sc1(6 + t) > 0 Then a1 = 1
Next t: If a1 = 1 Then sc(cpl, s) = 400: If s > 28 Then sc(cpl, s) = sc(cpl, s) * 2
If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

780 Rem Fuller House
If sc(cpl, s) <> 0 Then 20
a1 = 0: For t = 0 To 12: sc1(t) = 0: Next t: For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
    sc1(di) = sc1(di) + 1: Next t: For t = 0 To 12: If sc1(t) > 3 Then a1 = a1 + 1
    Next t: For t = 1 To 13: If sc1(t) = 3 And a1 > 0 Then a1 = a1 + 1
Next t: If a1 > 1 Then sc(cpl, s) = 500: If s > 28 Then sc(cpl, s) = sc(cpl, s) * 2
If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

790 Rem Straight Flush
If sc(cpl, s) <> 0 Then 20
For t = 1 To 10: Do Until di(t) < 65: di(t) = di(t) - 65: Loop: Next t
a1 = 0: For y = 0 To 52 Step 13: For t = 0 To 12: sc1(t) = 0: Next t
    For t = 1 To 10: di = di(t): If di >= y And di < y + 13 Then Do Until di < 13: di = di - 13: Loop: sc1(di) = sc1(di) + 1
        Next t: For t = 0 To 8: If sc1(0 + t) > 0 And sc1(1 + t) > 0 And sc1(2 + t) > 0 And sc1(3 + t) > 0 And sc1(4 + t) > 0 Then a1 = 1
Next t, y: If a1 = 1 Then sc(cpl, s) = 600: If s > 28 Then sc(cpl, s) = sc(cpl, s) * 2
If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

800 Rem Royal Flush
If sc(cpl, s) <> 0 Then 20
For t = 1 To 10: Do Until di(t) < 65: di(t) = di(t) - 65: Loop: Next t
a1 = 0: For t = 0 To 10: sc2(t) = 0: Next t: For t = 1 To 10: di = di(t): a1 = di: Do Until a1 < 13: a1 = a1 - 13: Loop
    If (a1 = 0 Or a1 > 8) And di < 13 Then sc2(1) = sc2(1) + 1
    If (a1 = 0 Or a1 > 8) And (di > 12 And di < 26) Then sc2(2) = sc2(2) + 1
    If (a1 = 0 Or a1 > 8) And (di > 25 And di < 39) Then sc2(3) = sc2(3) + 1
    If (a1 = 0 Or a1 > 8) And (di > 38 And di < 52) Then sc2(4) = sc2(4) + 1
    If (a1 = 0 Or a1 > 8) And di > 51 Then sc2(5) = sc2(5) + 1
Next t: If sc2(1) > 4 Or sc2(2) > 4 Or sc2(3) > 4 Or sc2(4) > 4 Or sc2(5) > 4 Then a1 = 1 Else a1 = 0
If a1 = 1 Then sc(cpl, s) = 700: If s > 28 Then sc(cpl, s) = sc(cpl, s) * 2
If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

810 Rem Royal UnFlush
If sc(cpl, s) <> 0 Then 20
For t = 1 To 10: Do Until di(t) < 65: di(t) = di(t) - 65: Loop: Next t
a1 = 0: For t = 0 To 10: sc2(t) = 0: Next t: For t = 1 To 10: di = di(t): a1 = di: Do Until a1 < 13: a1 = a1 - 13: Loop
    If (a1 = 0 Or a1 > 8) And di < 13 Then sc2(1) = sc2(1) + 1
    If (a1 = 0 Or a1 > 8) And (di > 12 And di < 26) Then sc2(2) = sc2(2) + 1
    If (a1 = 0 Or a1 > 8) And (di > 25 And di < 39) Then sc2(3) = sc2(3) + 1
    If (a1 = 0 Or a1 > 8) And (di > 38 And di < 52) Then sc2(4) = sc2(4) + 1
    If (a1 = 0 Or a1 > 8) And di > 51 Then sc2(5) = sc2(5) + 1
Next t: If sc2(1) > 0 And sc2(2) > 0 And sc2(3) > 0 And sc2(4) > 0 And sc2(5) > 0 Then a1 = 1 Else a1 = 0
If a1 = 1 Then sc(cpl, s) = 800: If s > 28 Then sc(cpl, s) = sc(cpl, s) * 2
If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

820 Rem Royal Straight
If sc(cpl, s) <> 0 Then 20
a1 = 0: For t = 0 To 12: sc1(t) = 0: Next t: For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: Next t: If sc1(0) > 0 And sc1(9) > 0 And sc1(10) > 0 And sc1(11) > 0 And sc1(12) > 0 Then a1 = 1
If a1 = 1 Then sc(cpl, s) = 900: If s > 28 Then sc(cpl, s) = sc(cpl, s) * 2
If sc(cpl, s) = 0 Then sc(cpl, s) = -1
GoSub 3000: _Delay .5: GoTo 10

830 Rem Chance
If sc(cpl, s) <> 0 Then 20
x = 0: For t = 1 To 10: Do Until di(t) < 13: di(t) = di(t) - 13: Loop
x = x + di(t) + 1: Next t: sc(cpl, s) = x: If s > 28 Then sc(cpl, s) = sc(cpl, s) * 2
GoSub 3000: _Delay .5: GoTo 10

840 Rem Yoker
For t = 1 To 10: Do Until di(t) < 65: di(t) = di(t) - 65: Loop: Next t
a1 = 0: For y = 0 To 52 Step 13: For t = 0 To 12: sc1(t) = 0: Next t
    For t = 1 To 10: di = di(t): If di >= y And di < y + 13 Then sc1(di - y) = sc1(di - y) + 1
    Next t: If sc1(0) > 0 And sc1(9) > 0 And sc1(10) > 0 And sc1(11) > 0 And sc1(12) > 0 Then a1 = 1
Next y: y = 0
If a1 = 0 And sc(cpl, s) = 0 Then sc(cpl, s) = -1: y = 1
If a1 = 1 And sc(cpl, 28) > 0 And sc(cpl, 42) > 0 Then sc(cpl, 28) = sc(cpl, 28) + 2500: _SndPlay yay&: _Delay 3: y = 1
If a1 = 1 And sc(cpl, s) = 0 Then sc(cpl, s) = 1500: y = 1: If s > 28 Then sc(cpl, s) = 3000
If y <> 1 Then 20
GoSub 3000: _Delay .5: GoTo 10

900 Rem Save Game
Open "o", #2, "Data\yoker.txt"
Print #2, pl: Print #2, cpl: Print #2, deal
For t = 1 To 10: Print #2, rd(t): Print #2, di(t): Next t
For t = 1 To 6: For y = 1 To 42: Print #2, sc(t, y): Next y, t
For t = 1 To 6: Print #2, pl$(t): Print #2, sct(t): Print #2, br(t): Next t
For t = 0 To 260: Print #2, cards(t): Next t
Close #2
Color LGREEN, BLACK: Locate 4, 473: Print "GAME SAVED";
Sleep 1
Color LGREEN, PURPLE: Locate 4, 473: Print "          ";: _SndPlay cl&
GoTo 20

950 Rem Load the last saved game
If _FileExists("data\yoker.txt") = 0 Then b$ = "NO SAVED GAME EXISTS": Color RED: a = _PrintWidth(b$): Locate 9, 331 - (a * .5): Print b$;: _Delay 1: Locate 9, 331 - (a * .5): Print "                    ";: GoTo 5
Open "i", #2, "Data\yoker.txt"
Input #2, pl: Input #2, cpl: Input #2, deal
For t = 1 To 10: Input #2, rd(t): Input #2, di(t): Next t
For t = 1 To 6: For y = 1 To 42: Input #2, sc(t, y): Next y, t
For t = 1 To 6: Input #2, pl$(t): Input #2, sct(t): Input #2, br(t): Next t
For t = 0 To 260: Input #2, cards(t): Next t
Close #2
If _FileExists("data\hscore.txt") = 0 Then 955
Open "i", #2, "Data\hscore.txt"
Input #2, hs$
Input #2, hs
Close #2

955 _PutImage (0, 0), i1&
For t = 0 To 9: For y = 0 To 2
        Line (15 - y + (t * 64), 744 - y)-(y + 65 + (t * 64), 794 + y), BLACK, B
Next y, t
_PutImage (133, 664)-(201, 722), rn&, 0, (1 + (69 * (deal - 1)), 1)
GoSub 3000
For t = 1 To 10: di = di(t): Do Until di < 65: di = di - 65: Loop
    _PutImage (16 + ((t - 1) * 64), 745)-(64 + ((t - 1) * 64), 793), cards&, 0, (13 + (72 * Int(di / 13)), 10 + (66 * (di - (Int(di / 13) * 13))))
Next t: GoSub 5000: GoTo 20

1000 Rem Boss Mode
For t = 1 To 10: rd(t) = 0: Next t
_SndStop bm&: bmus = 0: _SndClose bm&: _ScreenIcon: _ScreenHide: Sleep 300: _ScreenShow: GoTo 20

1100 Rem Music on/off
If bmus <> 1 Then bmus = 1 Else bmus = 0
If bmus = 1 Then bm& = 0: bm& = _SndOpen("data\bm.ogg"): _SndLoop bm&: _SndVol bm&, .25
If bmus = 0 Then _SndStop bm&: _SndClose bm&
GoTo 20

1200 Rem Skip Player
Locate 51, 20: Print "                                                        ";
For t = 0 To 9: Line (15 + (t * 64), 744)-(65 + (t * 64), 794), BLACK, BF: Next t
Do: m1 = _MouseInput + _MouseButton(1) + _MouseButton(2): Loop Until m1 = 0
GoTo 10

1500 Rem End Game
_PutImage (50, 100), go&
Color BLACK, LGREEN
a$ = "Sadness has befallen me...  The game is over": a = _PrintWidth(a$): Locate 27, 331 - (a * .5): Print a$;
If pl = 0 Then 1510
a$ = "Here are the final scores:": a = _PrintWidth(a$): Locate 29, 331 - (a * .5): Print a$;
For t = 1 To pl - 1: For y = t + 1 To pl
        If sct(y) > sct(t) Then sct = sct(t): sct(t) = sct(y): sct(y) = sct: PL$ = pl$(t): pl$(t) = pl$(y): pl$(y) = PL$
Next y, t
For t = 1 To pl: b$ = Str$(sct(t)): b$ = Right$(b$, Len(b$) - 1): If sct(t) > 999 Then b$ = Left$(b$, Len(b$) - 3) + "," + Right$(b$, 3)
    a$ = "Nice Game " + pl$(t) + Left$("            ", 13 - Len(pl$(t))) + " - Your score was " + Left$("      ", 6 - Len(b$)) + b$
    a = _PrintWidth(a$): Locate 30 + t, 331 - (a * .5): Print a$;: _SndPlay cl&: _Delay .5
Next t
b$ = Str$(hs): b$ = Right$(b$, Len(b$) - 1): If hs > 999 Then b$ = Left$(b$, Len(b$) - 3) + "," + Right$(b$, 3)
a$ = "Current High Score: " + b$ + " by " + hs$: a = _PrintWidth(a$) * .5
Locate 38, 331 - a: Print a$;
If sct(1) > hs Then hs = sct(1): hs$ = pl$(1)
b$ = Str$(hs): b$ = Right$(b$, Len(b$) - 1): If hs > 999 Then b$ = Left$(b$, Len(b$) - 3) + "," + Right$(b$, 3)
a$ = "New High Score: " + b$ + " by " + hs$: a = _PrintWidth(a$) * .5
Locate 40, 331 - a: Print a$;
Open "o", #2, "Data\hscore.txt"
Print #2, hs$
Print #2, hs
Close #2
a$ = "THANKS FOR PLAYING": a = _PrintWidth(a$): Locate 42, 331 - (a * .5): Print a$;

1510 a$ = "Press any key to end": x = 331 - (_PrintWidth(a$) * .5): y = 44: z = 0
Do: Loop Until InKey$ = ""
z = 0: c$ = Time$
Loop3:
Do: m1 = _MouseInput + _MouseButton(1) + _MouseButton(2): Loop Until m1 = 0
Locate y, x: If z = 0 Then Print a$;: Else Print "                    ";
If c$ <> Time$ Then c$ = Time$: z = 1 - z: _SndPlay cl&
m1 = _MouseInput: m2 = _MouseX: m3 = _MouseY: m4 = _MouseButton(1): m5 = _MouseButton(2)
If InKey$ = "" And m4 = 0 And m5 = 0 GoTo Loop3
System

1600 Rem HELP
oi& = _CopyImage(0)
_PutImage (0, 0), yh1&
Do: m1 = _MouseInput + _MouseButton(1) + _MouseButton(2): Loop Until m1 = 0
Do: m1 = _MouseInput: m2 = _MouseX: m3 = _MouseY: m4 = _MouseButton(1): m5 = _MouseButton(2)
Loop Until m4 = -1 Or m5 = -1
_SndPlay cl&
_PutImage (0, 0), yh2&
Do: m1 = _MouseInput + _MouseButton(1) + _MouseButton(2): Loop Until m1 = 0
Do: m1 = _MouseInput: m2 = _MouseX: m3 = _MouseY: m4 = _MouseButton(1): m5 = _MouseButton(2)
Loop Until m4 = -1 Or m5 = -1
_SndPlay cl&
_PutImage (0, 0), yh3&
Do: m1 = _MouseInput + _MouseButton(1) + _MouseButton(2): Loop Until m1 = 0
Do: m1 = _MouseInput: m2 = _MouseX: m3 = _MouseY: m4 = _MouseButton(1): m5 = _MouseButton(2)
Loop Until m4 = -1 Or m5 = -1
_SndPlay cl&:
Screen oi&: GoTo 20

2000 Rem Shuffle & Deal Cards
Color BLACK, GRAY: Locate 51, 20: Print "Press the LEFT mouse button to stop early:                ";
_SndPlay shu&: nod = 0: t = 0: dlimit = 1005000
_PutImage (133, 664)-(201, 722), rn&, 0, (1 + (69 * (deal - 1)), 1): _PutImage (440, 800), oom&
Do: t = t + 1: If rd(t) = 0 Then 2005
    Do: di = Int(Rnd(1) * 65): mu = Int(Rnd(1) * 4): di(t) = di + (mu * 65): Loop Until cards(di(t)) <> -1
    _PutImage (16 + ((t - 1) * 64), 745)-(64 + ((t - 1) * 64), 793), cards&, 0, (13 + (72 * Int(di / 13)), 10 + (66 * (di - (Int(di / 13) * 13))))
    nod = nod + 1: If nod / 5000 = Int(nod / 5000) Then Line (441 + Int(nod / 5000), 806)-(441 + Int(nod / 5000), 809), BLACK
    m1 = _MouseInput: m2 = _MouseX: m3 = _MouseY: m4 = _MouseButton(1): m5 = _MouseButton(2): If m4 <> -1 Then a = 1
    If nod > dlimit Or (a = 1 And m3 > 741 And m4 = -1) Then nod = 0: _SndPlay dealt&: a = 0: cards(di(t)) = -1: x = 0: Do: x = x + 1: Loop Until rd(x) = 1: rd(x) = 0: _PutImage (440, 800), oom&
    If m3 > 17 And m3 < 40 And m2 > 378 And m2 < 400 And m4 = -1 Then dlimit = 25000 'Faster Shuffle
    If m2 > 505 And m2 < 578 And m3 > 661 And m3 < 723 And m4 = -1 GoTo 1000 'Boss Mode
    If m2 > 581 And m2 < 664 And m3 > 661 And m3 < 723 And m4 = -1 Then _SndPlay cl&: GoTo 1500 'End Game
    If pl > 1 And m2 > 441 And m2 < 467 And m3 > 16 And m3 < 42 And m4 = -1 Then _SndPlay cl&: GoTo 1200 'Skip Player
    2005 If t = 10 Then t = 0
Loop Until rd(1) + rd(2) + rd(3) + rd(4) + rd(5) + rd(6) + rd(7) + rd(8) + rd(9) + rd(10) = 0
GoSub 5000: Return

3000 Rem Update Scoresheet
Color WHITE, PURPLE: Locate 5, 485: Print pl$(cpl);
For t = 1 To 14: If sc(cpl, t) = 0 Then Circle (255, 99 + (t * 32)), 2, BLACK
    Next t: For t = 1 To 14: If sc(cpl, t + 14) = 0 Then Circle (542, 99 + (t * 32)), 2, BLACK
    Next t: For t = 1 To 14: If sc(cpl, t + 28) = 0 Then Circle (618, 99 + (t * 32)), 2, BLACK
Next t
y = 9: For t = 1 To 42
    If t < 15 Then x = 228 Else If t > 28 Then x = 589 Else x = 514
    Locate y, x
    If sc(cpl, t) = -1 Then Color RED, WHITE: Print " X X X";
    If sc(cpl, t) > 0 Then Color BLUE, WHITE: Print Using "##,###"; sc(cpl, t);
    y = y + 2: If y = 37 Then y = 9
Next t: sct(cpl) = 0: s = 0
For t = 1 To 14: If sc(cpl, t) > 0 Then s = s + sc(cpl, t)
Next t: Color BLACK, WHITE: Locate 37, 228: Print Using "##,###"; s;: sct(cpl) = sct(cpl) + s
br(cpl) = 0: If sct(cpl) > 400 Then br(cpl) = 2: sct(cpl) = sct(cpl) + 1000
If br(cpl) = 0 Then _PutImage (15, 708), dea&, 0, (0, 9)-(43, 18) Else _PutImage (15, 708), dea&, 0, (0, 0)-(43, 8)
Color BLACK, WHITE: Locate 39, 228: Print Using "##,###"; br(cpl) * 500;
Color BLACK, WHITE: Locate 41, 228: Print Using "##,###"; sct(cpl);
Color BLACK, WHITE: Locate 39, 589: Print Using "##,###"; sct(cpl);
s = 0: For t = 15 To 28: If sc(cpl, t) > 0 Then s = s + sc(cpl, t)
Next t: Color BLACK, WHITE: Locate 37, 514: Print Using "##,###"; s;: sct(cpl) = sct(cpl) + s
s = 0: For t = 29 To 42: If sc(cpl, t) > 0 Then s = s + sc(cpl, t)
Next t: Color BLACK, WHITE: Locate 37, 589: Print Using "##,###"; s;: sct(cpl) = sct(cpl) + s
Color BLACK, WHITE: Locate 41, 589: Print Using "##,###"; sct(cpl);
Color BLACK, YELLOW
If hs > 0 Then a = _PrintWidth(hs$) * .5: Locate 44, 428 - a: Print hs$;
a$ = Str$(hs): a$ = Right$(a$, Len(a$) - 1): If hs > 999 Then a$ = Left$(a$, Len(a$) - 3) + "," + Right$(a$, 3)
a = _PrintWidth(a$) * .5: Locate 45, 428 - a: Print a$;
s = 1: For y = 1 To pl: For t = 1 To 42: If sc(y, t) = 0 Then s = 0
Next t, y: If s = 0 Then Return
Do: m1 = _MouseInput + _MouseButton(1) + _MouseButton(2): Loop Until m1 = 0
c$ = Time$: z = 0
Loop4:
If z = 0 Then _PutImage (10, 10), go1& Else _PutImage (10, 10)-(326, 78), i1&, 0, (10, 10)
If c$ <> Time$ Then c$ = Time$: z = 1 - z: _SndPlay cl&
m1 = _MouseInput: m2 = _MouseX: m3 = _MouseY: m4 = _MouseButton(1): m5 = _MouseButton(2)
If InKey$ = "" And m4 = 0 And m5 = 0 GoTo Loop4
GoTo 1500

5000 Rem Give Hints
'Ace - King
For t = 0 To 12: sc1(t) = 0: Next t
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop: sc1(di) = sc1(di) + 1: Next t
For t = 0 To 12
    If sc1(t) > 3 Then Line (220, 127 + t * 32)-(225, 137 + t * 32), RED, BF Else Line (220, 127 + t * 32)-(225, 137 + t * 32), WHITE, BF
Next t
'Royals
For t = 0 To 12: sc1(t) = 0: Next t
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop: If di = 0 Or di > 8 Then sc1(1) = sc1(1) + di + 1
Next t: If sc1(1) > 60 Then Line (220, 543)-(225, 553), RED, BF Else Line (220, 543)-(225, 553), WHITE, BF
'3 Pair
For t = 0 To 12: sc1(t) = 0: Next t: x = 0
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: x = x + di + 1: Next t
a1 = 0: For t = 0 To 12: a1 = a1 + Int(sc1(t) / 2): Next t
If a1 > 2 Then Line (506, 127)-(511, 137), RED, BF Else Line (506, 127)-(511, 137), WHITE, BF
'4 Pair
For t = 0 To 12: sc1(t) = 0: Next t: x = 0
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: x = x + di + 1: Next t
a1 = 0: For t = 0 To 12: a1 = a1 + Int(sc1(t) / 2): Next t
If a1 > 3 Then Line (506, 159)-(511, 169), RED, BF Else Line (506, 159)-(511, 169), WHITE, BF
'4 Alike
For t = 0 To 12: sc1(t) = 0: Next t: x = 0
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: x = x + di + 1: Next t
a1 = 0: For t = 0 To 12: If sc1(t) > 3 Then a1 = 1
Next t: If a1 = 1 Then Line (506, 191)-(511, 201), RED, BF Else Line (506, 191)-(511, 201), WHITE, BF
'5 Alike
For t = 0 To 12: sc1(t) = 0: Next t: x = 0
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: x = x + di + 1: Next t
a1 = 0: For t = 0 To 12: If sc1(t) > 4 Then a1 = 1
Next t: If a1 = 1 Then Line (506, 223)-(511, 233), RED, BF Else Line (506, 223)-(511, 233), WHITE, BF
'6 Card Flush
For t = 1 To 5: sc2(t) = 0: Next t: a1 = 0
For t = 1 To 10: di = di(t): Do Until di < 65: di = di - 65: Loop
    If di < 13 Then sc2(1) = sc2(1) + 1
    If di > 12 And di < 26 Then sc2(2) = sc2(2) + 1
    If di > 25 And di < 39 Then sc2(3) = sc2(3) + 1
    If di > 38 And di < 52 Then sc2(4) = sc2(4) + 1
    If di > 51 Then sc2(5) = sc2(5) + 1
    Next t: For t = 1 To 5: If sc2(t) > 5 Then a1 = 1
Next t: If a1 = 1 Then Line (506, 255)-(511, 265), RED, BF Else Line (506, 255)-(511, 265), WHITE, BF
'6c straight
a1 = 0: For t = 0 To 12: sc1(t) = 0: Next t
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: Next t
For t = 0 To 7: If sc1(0 + t) > 0 And sc1(1 + t) > 0 And sc1(2 + t) > 0 And sc1(3 + t) > 0 And sc1(4 + t) > 0 And sc1(5 + t) > 0 Then a1 = 1
Next t: If a1 = 1 Then Line (506, 287)-(511, 297), RED, BF Else Line (506, 287)-(511, 297), WHITE, BF
'7c straight
a1 = 0: For t = 0 To 12: sc1(t) = 0: Next t
For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: Next t
For t = 0 To 6: If sc1(0 + t) > 0 And sc1(1 + t) > 0 And sc1(2 + t) > 0 And sc1(3 + t) > 0 And sc1(4 + t) > 0 And sc1(5 + t) > 0 And sc1(6 + t) > 0 Then a1 = 1
Next t: If a1 = 1 Then Line (506, 319)-(511, 329), RED, BF Else Line (506, 319)-(511, 329), WHITE, BF
'fuller house
a1 = 0: For t = 0 To 12: sc1(t) = 0: Next t: For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
    sc1(di) = sc1(di) + 1: Next t: For t = 0 To 12: If sc1(t) > 3 Then a1 = a1 + 1
    Next t: For t = 1 To 13: If sc1(t) = 3 And a1 > 0 Then a1 = a1 + 1
Next t: If a1 > 1 Then Line (506, 351)-(511, 361), RED, BF Else Line (506, 351)-(511, 361), WHITE, BF
'straight flush
For t = 1 To 10: sc2(t) = di(t): Do Until sc2(t) < 65: sc2(t) = sc2(t) - 65: Loop: Next t
a1 = 0: For y = 0 To 52 Step 13: For t = 0 To 12: sc1(t) = 0: Next t
    For t = 1 To 10: di = sc2(t): If di >= y And di < y + 13 Then Do Until di < 13: di = di - 13: Loop: sc1(di) = sc1(di) + 1
        Next t: For t = 0 To 8: If sc1(0 + t) > 0 And sc1(1 + t) > 0 And sc1(2 + t) > 0 And sc1(3 + t) > 0 And sc1(4 + t) > 0 Then a1 = 1
Next t, y: If a1 = 1 Then Line (506, 383)-(511, 393), RED, BF Else Line (506, 383)-(511, 393), WHITE, BF
'royal flush
For t = 1 To 10: sc1(t) = di(t): Do Until sc1(t) < 65: sc1(t) = sc1(t) - 65: Loop: Next t
a1 = 0: For t = 0 To 10: sc2(t) = 0: Next t: For t = 1 To 10: di = sc1(t): a1 = di: Do Until a1 < 13: a1 = a1 - 13: Loop
    If (a1 = 0 Or a1 > 8) And di < 13 Then sc2(1) = sc2(1) + 1
    If (a1 = 0 Or a1 > 8) And (di > 12 And di < 26) Then sc2(2) = sc2(2) + 1
    If (a1 = 0 Or a1 > 8) And (di > 25 And di < 39) Then sc2(3) = sc2(3) + 1
    If (a1 = 0 Or a1 > 8) And (di > 38 And di < 52) Then sc2(4) = sc2(4) + 1
    If (a1 = 0 Or a1 > 8) And di > 51 Then sc2(5) = sc2(5) + 1
Next t: If sc2(1) > 4 Or sc2(2) > 4 Or sc2(3) > 4 Or sc2(4) > 4 Or sc2(5) > 4 Then a1 = 1 Else a1 = 0
If a1 = 1 Then Line (506, 415)-(511, 425), RED, BF Else Line (506, 415)-(511, 425), WHITE, BF
'royal unflush
For t = 1 To 10: sc1(t) = di(t): Do Until sc1(t) < 65: sc1(t) = sc1(t) - 65: Loop: Next t
a1 = 0: For t = 0 To 10: sc2(t) = 0: Next t: For t = 1 To 10: di = sc1(t): a1 = di: Do Until a1 < 13: a1 = a1 - 13: Loop
    If (a1 = 0 Or a1 > 8) And di < 13 Then sc2(1) = sc2(1) + 1
    If (a1 = 0 Or a1 > 8) And (di > 12 And di < 26) Then sc2(2) = sc2(2) + 1
    If (a1 = 0 Or a1 > 8) And (di > 25 And di < 39) Then sc2(3) = sc2(3) + 1
    If (a1 = 0 Or a1 > 8) And (di > 38 And di < 52) Then sc2(4) = sc2(4) + 1
    If (a1 = 0 Or a1 > 8) And di > 51 Then sc2(5) = sc2(5) + 1
Next t: If sc2(1) > 0 And sc2(2) > 0 And sc2(3) > 0 And sc2(4) > 0 And sc2(5) > 0 Then a1 = 1 Else a1 = 0
If a1 = 1 Then Line (506, 447)-(511, 457), RED, BF Else Line (506, 447)-(511, 457), WHITE, BF
'royal straight
a1 = 0: For t = 0 To 12: sc1(t) = 0: Next t: For t = 1 To 10: di = di(t): Do Until di < 13: di = di - 13: Loop
sc1(di) = sc1(di) + 1: Next t: If sc1(0) > 0 And sc1(9) > 0 And sc1(10) > 0 And sc1(11) > 0 And sc1(12) > 0 Then a1 = 1
If a1 = 1 Then Line (506, 479)-(511, 489), RED, BF Else Line (506, 479)-(511, 489), WHITE, BF
'Chance
x = 0: For t = 1 To 10: sc1(t) = di(t): Do Until sc1(t) < 13: sc1(t) = sc1(t) - 13: Loop
x = x + di(t) + 1: Next t: If (sc(cpl, 27) = 0 Or sc(cpl, 41) = 0) And x > 60 Then Line (506, 511)-(511, 521), RED, BF Else Line (506, 511)-(511, 521), WHITE, BF
'Yoker
For t = 1 To 10: sc2(t) = di(t): Do Until sc2(t) < 65: sc2(t) = sc2(t) - 65: Loop: Next t
a1 = 0: For y = 0 To 52 Step 13: For t = 0 To 12: sc1(t) = 0: Next t
    For t = 1 To 10: di = sc2(t): If di >= y And di < y + 13 Then sc1(di - y) = sc1(di - y) + 1
    Next t: If sc1(0) > 0 And sc1(9) > 0 And sc1(10) > 0 And sc1(11) > 0 And sc1(12) > 0 Then a1 = 1
Next y: If a1 = 1 Then Line (506, 543)-(511, 553), RED, BF Else Line (506, 543)-(511, 553), WHITE, BF
Return


Attached Files
.zip   Yoker.zip (Size: 8.05 MB / Downloads: 92)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Yoker - Original by David Coterel dcoterel 2 714 07-20-2025, 04:35 AM
Last Post: dcoterel
  A Yahtzee Clone dcoterel 1 537 07-12-2025, 09:11 AM
Last Post: bplus
  Simple Draw poker game Helium5793 14 2,249 03-04-2025, 02:12 AM
Last Post: SMcNeill
  Steve's Poker Playhouse SMcNeill 0 565 12-30-2023, 08:07 PM
Last Post: SMcNeill

Forum Jump:


Users browsing this thread: 1 Guest(s)