Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Yoker - Original by David Coterel
#1
My Original YOKER game
Download the zip file below for all resource files

Code: (Select All)

_Title "Yoker by David Coterel"

v = 4.8

_FullScreen: Screen 7: Randomize (-Timer): Cls: On Error GoTo 7000
Dim rp(10), fs$(28), cco(5) As Integer, H$(8), pl$(4), n1$(4), deck(130) As Integer, cards(4, 10) As Integer
Dim score(4, 28) As Integer, d(10) As Integer, SC1(13) As Integer, sc2(10) As Integer, bp(4) As Integer

e = 0: cco(1) = 2: cco(2) = 4: cco(3) = 9: cco(4) = 6: cco(5) = 5

angel& = _SndOpen("sounds\angel.wav")
eor& = _SndOpen("sounds\eor.wav")
cards& = _SndOpen("sounds\cards.wav")
deal& = _SndOpen("sounds\deal.wav")
click& = _SndOpen("sounds\click.wav")
gameover& = _SndOpen("sounds\gameover.wav")
zero& = _SndOpen("sounds\zero.wav")
app& = _SndOpen("sounds\applause.wav")
siren& = _SndOpen("sounds\siren.wav")
mis& = _SndOpen("sounds\miss.wav")
shuf& = _SndOpen("sounds\shuffle.wav")
typ& = _SndOpen("sounds\type.wav")
ding& = _SndOpen("sounds\ding.wav")
bonus& = _SndOpen("sounds\bonus.wav")

Data "ACES","TWOS","THREES","FOURS","FIVES","SIXES","SEVENS","EIGHTS","NINES","TENS","JACKS","QUEENS","KINGS","ROYALS"
Data "THREE PAIR","FOUR PAIR","FOUR ALIKE","FIVE ALIKE","SIX CARD FLUSH","STRAIGHT FLUSH","ROYAL FLUSH","ROYAL UNFLUSH"
Data "SIX STRAIGHT","SEVEN STRAIGHT","ROYAL STRAIGHT","FULLER HOUSE","CHANCE","RSF YOKER"
For t = 1 To 28: Read fs$(t): Next t

For y = 1 To 4: bp(y) = 0: For t = 1 To 28: score(y, t) = -1: Next t, y: cpl = 1

boss = 0
Open "i", #2, "Data\YokerScores"
Input #2, a: If a = 0 Then For t = 1 To 4: Input #2, H$(t): Next t: Close #2: GoTo start
boss = 1
For t = 1 To 4: Input #2, H$(t): Next t
For t = 1 To 10: Input #2, rp(t): Next t
For t = 1 To 10: Input #2, d(t): Next t
For t = 1 To 10: Input #2, sc2(t): Next t
For t = 1 To 28: Input #2, fs$(t): Next t
For t = 1 To 5: Input #2, cco(t): Next t
For t = 1 To 8: Input #2, H$(t): Next t
For t = 1 To 4: Input #2, pl$(t): Next t
For t = 1 To 4: Input #2, n1$(t): Next t
For t = 1 To 4: Input #2, bp(t): Next t
For t = 1 To 130: Input #2, deck(t): Next t
For t = 1 To 4: For y = 1 To 10: Input #2, cards(t, y): Next y, t
For t = 1 To 4: For y = 1 To 28: Input #2, score(t, y): Next y, t
For t = 1 To 13: Input #2, SC1(t): Next t
Input #2, round: Input #2, cpl: Input #2, pl
Input #2, bn99: Close #2: GoTo 4


start:
_SndLoop angel&
If H$(1) = "" Then For t = 1 To 4: H$(t) = ".......    " + Str$(50 - t * 10): Next t
PSet (40, 25), 4: Draw "C1 R1D3L1U3R1D3F1R3L1D4L1U4R2E1U3R1D3 BD9 C2 D6G1L5H1U6E1R5D7L5U6R6 BD10"
Draw "C3 BL1R1D1L1U1D1G1L1D1R1L5U3R1D8L1U4R3L1D1R3L1D1R1F1D1E1D1 BD3 C4 BL1L5D1L1D6R1D1R5U1R1L6U3R3L3U3R6 BD10"
Draw "C5 BL1L6D8R1U7R1L1D2R1D1R4U3L1R2D2L2D1L3D1R2D1R2L1D1R2D1L1 BD5 BL22"
Draw "C6 D4R3E1H1L3U2R3F1 BR2 C7 U1D1F1R1D2U2R1E1U1 BR8 C8 D4R3E1U2H1L3 BR7 C9 R2F1D3U2L4D2U3E1 BR5"
Draw "C10 D2F2E2U2 BR2 C11 R4L4D2R2L2D2R4 BD4 BL40 C12 R4L4D4R4 BR3 C13 R2E1U2H1L2G1D2F1 BR7 C14 U4L2R4 BR2"
Draw "C15 R4L4D2R2L2D2R4 BR2 C1 U4R3F1G1L2F2R1 BR2 C2 R4L4U2R2L2U2R4 BR2 C3 D4R4"
Color 13: Locate 4, 10: Print "Welcome to Yoker      v"; Right$(Str$(v), Len(Str$(v)) - 1)
pl = 10: Color 10: Locate 6, 10: Print "How many players [1-4]: ";


Do: a$ = InKey$

    x = ((Rand%(16) - 1) * 20) + 3: y = 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = 303: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = ((Rand%(16) - 1) * 20) + 3: y = 182: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = 3: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000

Loop Until a$ >= "0" And a$ < "5"

_SndPlay click&
If a$ = "0" Then pl = 0: GoTo 80
_SndVol angel&, .1


color15: pl = Val(a$): Print a$
For t = 1 To pl: Color 1: Locate t + 7, 10: Print Using "Player #'s name: "; t;: _SndPlay click&
    Loop1:
    x = ((Rand%(16) - 1) * 20) + 3: y = 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = 303: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = ((Rand%(16) - 1) * 20) + 3: y = 182: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = 3: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000

    Color 15: a$ = InKey$: If a$ = "" GoTo Loop1
    If a$ >= "a" And a$ <= "z" And Len(n$) < 6 Then n$ = n$ + a$: Print a$;: _SndPlay click&: GoTo Loop1
    If a$ >= "A" And a$ <= "Z" And Len(n$) < 6 Then n$ = n$ + a$: Print a$;: _SndPlay click&: GoTo Loop1
    If a$ >= "0" And a$ <= "9" And Len(n$) < 6 Then n$ = n$ + a$: Print a$;: _SndPlay click&: GoTo Loop1
    If a$ = Chr$(8) And Len(n$) > 0 Then n$ = Left$(n$, Len(n$) - 1): Locate t + 7, 27: Print n$; " ";: _SndPlay click&: Locate t + 7, 27: Print n$;
    If a$ <> Chr$(13) GoTo Loop1
    _SndPlay click&: If Len(n$) = 0 GoTo Loop1
    pl$(t) = UCase$(Left$(n$, 1)): If Len(n$) > 1 Then pl$(t) = pl$(t) + LCase$(Right$(n$, Len(n$) - 1))
n$ = "": Next t

If pl = 1 GoTo START1
Locate 14, 5: Color 14: Print "Randomizing Players...": Locate 16, 5
For t = 1 To 100
    x = ((Rand%(16) - 1) * 20) + 3: y = 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = 303: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = ((Rand%(16) - 1) * 20) + 3: y = 182: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = 3: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
a = Rand%(pl): b = Rand%(pl): PL$ = pl$(a): pl$(a) = pl$(b): pl$(b) = PL$: Next t
For t = 1 To pl: _Delay .5: Color 7 + t: Print pl$(t); "  ";
    x = ((Rand%(16) - 1) * 20) + 3: y = 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = 303: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = ((Rand%(16) - 1) * 20) + 3: y = 182: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = 3: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
_SndPlay (ding&): Next t

START1:
_SndVol angel&, 1: Locate 19, 5: Color 13: Print "Allow Right Side Bonuses [y/n]:";
Do: a$ = InKey$: Loop Until LCase$(a$) = "y" Or LCase$(a$) = "n"
_SndPlay click&: Print a$: If LCase$(a$) = "y" Then bn99 = 1 Else bn99 = 0
Locate 19, 5: Color 12: Print "      Press SPACE to begin      "
Locate 21, 8: Print "or [i] for instructions..."
Do: Loop Until ineky$ = ""
_SndPlay click&: Do
    x = ((Rand%(16) - 1) * 20) + 3: y = 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = 303: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = ((Rand%(16) - 1) * 20) + 3: y = 182: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = 3: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000

a$ = InKey$: Loop Until a$ = " " Or a$ = "i" Or a$ = "I"
_SndStop (angel&): If a$ = " " Then 3











Instructions:
Rem ******* INSTRUCTIONS *********
_SndPlay click&: Screen 12: Cls: Locate 29
Data " "
Data "Yoker is played with TWO decks of cards, EACH containing 5 suites or"
Data "(colors) of 13 cards ranked in order from 1(Ace) to (13)King, each player"
Data "every turn plays with a brand new deck of 130 cards freshly shuffled."
Data " "
Data "At the beginning of each turn ten cards are randomly dealt to the current"
Data "player followed by two more rounds of discarding and redrawing cards in"
Data "order to maximize your score, if no valid entry can be made then a zero"
Data "must be taken somewhere on the scoresheet."
Data " "
Data "The game is over when all selections on the scoresheet are filled in and"
Data "no more valid plays can be made. "
Data " "
Data "Cards can be rearranged in your hand by simply right clicking on the cards you"
Data "want to move, similarly cards can be selected for discard by left clicking on"
Data "the ones you want to discard, then clicking DRAW to draw new cards from the"
Data "deck."
Data " "
Data "While cards are being shuffled a mouse click will stop them or you can allow"
Data "them to shuffle until the end of a preset timer."
Data " "
Data "Clicking ALL will select or de-select all cards for redraw while clicking"
Data "REP repeats the last selections for redraw but will not shuffle until DRAW"
Data "is clicked."
Data " "
Data "After each draw hints will be offered with red arrows. SCORE must"
Data "be selected to go to the scoring section, once selected you cannot return to"
Data "manipulate your cards any further, you will hear two warnings if going early."
Data " "
Data "Clicking the red stop sign (BOSS MODE) saves the current state of the game"
Data "and instantly quits the game returning you to windows, the green stop sign"
Data "will end the game normally. If BOSS MODE is activated the next time the"
Data "game loads it will return to the point it was stopped automatically."
Data " "
Data "Boss mode can also be used to quit the game saving your progress, when the"
Data "game starts back up it will resume where you left off, canceling BOSS MODE"
Data "can be done by ending the game normally with the green stop sign or"
Data "finishing the game naturally."
Data " "
Data "Terms: Royal refers to cards 10,J,Q,K and Ace, the term Flush refers to"
Data "cards of the same suit or color, a six straight is six or more cards"
Data "in sequential order with Aces being one, a seven straight is seven or more"
Data "cards in sequential order."
Data " "
Data "A mouse is required for gameplay, the keyboard will only be used while"
Data "selecting the number of players and entering their names."
Data " "
Data "Points are awarded in the following manner:"
Data " "
Data "Rows on the left side (Aces - Royals) are awarded by adding together the"
Data "cards in your hand matching the selection (Royals A,10,J,Q,K)."
Data " "
Data "Example: a hand of A A 3 5 10 10 10 J J Q in the tens would give you 30."
Data "Likewise: A A 3 5 10 10 10 J J Q in the royals would give you 64."
Data " "
Data "A bar graph will be displayed above your cards indicating the 5 suits"
Data "represented by their colors, a white horizontal line indicates how many"
Data "cards you have within that suit and a white vertical line will indicate"
Data "how many of them are royals."
Data " "
Data "Selections on the right are awarded as follows (with Bonuses for extras):"
Data " "
Data "(Boneses: Once a selection contains a valid score, another qualifying"
Data "hand can be added to the same selection for half the points)"
Data " "
Data "3 Pair, 4 Pair, 4 Alike, and 5 Alike and Chance are awarded by the total"
Data "of all the cards in your hand (no bonuses)."
Data " "
Data "Six Card Flush.............................100 (  50 Bonus)"
Data "Five Card Straight Flush...................250 ( 125 Bonus)"
Data "Five Card Royal Flush......................500 ( 250 Bonus)"
Data "Five Card Royal Unflush....................500 ( 250 Bonus)"
Data "Six Card Small Straight....................100 (  50 Bonus)"
Data "Seven Card Large Straight..................250 ( 125 Bonus)"
Data "Five Card Royal Straight...................500 ( 250 Bonus)"
Data "Seven Card Fuller House (4/3)..............175 (  88 Bonus)"
Data "Five Card Royal Straight Flush (YOKER)....2000 (1000 Bonus)"
Data " "
Data "A YOKER is a Royal Straight Flush... ex. A, K, Q, J, 10 same suit (color)."
Data "A FULLER HOUSE is at least 4 of one card and 3 of another (rank only)."
Data "An UNFLUSH is the oppposite of a flush (All different suits/colors)."
Data " "
Data "A bonus of 1500 points is awarded if the total of the left column (LC)"
Data "reaches 350 or more, if you make bonus, from then on you will be"
Data "awarded three extra rounds each turn to better manipulate your cards"
Data "for the higher scoring selections on the right side."
Data " "
Data "After the game ends an additional bonus of 1500 points will be awarded"
Data "to each player who completes the game without taking any zeros (NGZ)."
Data " "
Data "This game takes a while to play... for one player without boneses it could"
Data "take an hour, for one player with boneses multiple hours, more players,"
Data "longer game times higher scores. Players can choose at the beginning of"
Data "the game whether bonuses will be allowed or not, bonuses will always be"
Data "allowed for extra Yokers, left side total of 350 or more and no game zeros."
Data " "
Data " "
Data "This game was created from a dream, if you like it or have any"
Data "comments or suggestions please let me know"
Data " "
Data "dcoterel@woh.rr.com"
Data " "
Data "ENJOY"
Data " "
Data "end"

b = 1: c = Rand%(13): b$ = "": Read a$: Do Until a$ = "end"
    Print Spc(40 - (Len(a$) / 2));
    If a$ = " " Then c = c + 1: If c = 15 Then c = 1
    Color c
    For t = 1 To Len(a$): Print Mid$(a$, t, 1);
        i$ = InKey$
        If i$ = " " Then b = 3 - b
        If b = 1 Then _SndPlay (typ&): _Delay Rand%(5) / 40
        If b = 2 Then _Delay .001
        If LCase$(i$) = "p" Then Sleep
    Next t: Print: _SndPlay (ding&)
Read a$: Loop

Do: a$ = InKey$: Loop Until a$ = ""

Color 15: Print: Print "Press SPACE to begin or [R] to re-read.";: Do: a$ = InKey$: Loop Until a$ = " " Or LCase$(a$) = "r"
_SndPlay click&
If LCase$(a$) = "r" Then Restore Instructions: GoTo Instructions




Screen 7




3 Rem ****** Next Round New Deck New Draws ******

Cls
Do Until InKey$ = "": Loop
For t = 1 To 130: deck(t) = 131 - t: Next t: round = 1
Color 15: Locate 12, 11: Print "Press MOUSE to stop!"
Color 8: Locate 14, 21 - ((Len(pl$(cpl)) + 7) / 2): Print pl$(cpl); "'s Turn";
Do: m1 = _MouseInput + _MouseButton(1) + _MouseButton(2): Loop Until m1 = 0
_SndPlay cards&
Color 8: Locate 14, 21 - ((Len(pl$(cpl)) + 7) / 2): Print pl$(cpl); "'s Turn";
t = 0: Do
    x = Rand%(130): y = Rand%(130): c = deck(x): deck(x) = deck(y): deck(y) = c
    i = Rand%(5): PSet (60 + ((i - 1) * 42) + (Rand%(31) - 1), Rand%(3) + 114), cco(i) + ((15 - cco(i)) * (Rand%(2) - 1))
    x = Rand%(130): y = Rand%(130): c = deck(x): deck(x) = deck(y): deck(y) = c
    i = Rand%(5): PSet (60 + ((i - 1) * 42) + (Rand%(31) - 1), Rand%(3) + 114), cco(i) + ((15 - cco(i)) * (Rand%(2) - 1))
    x = Rand%(130): y = Rand%(130): c = deck(x): deck(x) = deck(y): deck(y) = c
    i = Rand%(5): PSet (60 + ((i - 1) * 42) + (Rand%(31) - 1), Rand%(3) + 114), cco(i) + ((15 - cco(i)) * (Rand%(2) - 1))
    x = Rand%(130): y = Rand%(130): c = deck(x): deck(x) = deck(y): deck(y) = c
    i = Rand%(5): PSet (60 + ((i - 1) * 42) + (Rand%(31) - 1), Rand%(3) + 114), cco(i) + ((15 - cco(i)) * (Rand%(2) - 1))
    x = Rand%(130): y = Rand%(130): c = deck(x): deck(x) = deck(y): deck(y) = c
    Color 5: Locate 10, 4: Print Using "Shuffling the Cards ###### ### ###"; t, x, y;
    m = _MouseInput: m = _MouseButton(1) + _MouseButton(2)
    x = ((Rand%(16) - 1) * 20) + 3: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13)
    If Rand%(200) > 193 And (y < 45 Or y > 119 Or x < 21 Or x > 300) Then GoSub 3000
t = t + 1: Loop Until (m = -1 And t > 5000) Or t = 1000000
_SndStop cards&: _SndPlay deal&
For t = 1 To 10
    Do: c = Rand%(130)
    Loop Until deck(c) <> 0
    cards(cpl, t) = deck(c): deck(c) = 0
    Color 10: Locate 14, 10: Print Using "Dealing the Cards # ##"; cpl, t;
_Delay .2: Next t








Rem ****** Initial Sort
sort = 2: For t = 1 To 10: st1(t) = cards(cpl, t)
    Do Until st1(t) < 14: st1(t) = st1(t) - 13: Loop
    Next t: For t = 1 To 9: For y = t + 1 To 10
        If st1(y) < st1(t) Then c = st1(y): st1(y) = st1(t): st1(t) = c: c = cards(cpl, y): cards(cpl, y) = cards(cpl, t): cards(cpl, t) = c
Next y, t








4 Rem ****** Print Screen
c = 8: GoSub 4000






5 Rem ****** Manipulate Cards ******
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

x = m2: y = m3: If m4 = -1 And y > 25 And y < 31 And x < 16 Then 12

p = 1: Do: If m5 = -1 And y > 20 And y < 36 And x > 20 * p And x < 14 + (p * 20) Then 10
p = p + 1: Loop Until p = 11

If m4 = -1 And y > 12 And y < 28 And x > 254 And x < 295 And round = 3 + bp(cpl) Then 30
If m4 = -1 And y > 12 And y < 28 And x > 254 And x < 295 And round <> 3 + bp(cpl) Then _SndPlay mis&: l1 = l1 + 1: If l1 = 2 Then 30
If m4 = -1 And y > 35 And y < 51 And x > 254 And x < 295 And (d(1) = 1 Or d(2) = 1 Or d(3) = 1 Or d(4) = 1 Or d(5) = 1 Or d(6) = 1 Or d(7) = 1 Or d(8) = 1 Or d(9) = 1 Or d(10) = 1) And round <> 3 + bp(cpl) Then _SndPlay shuf&: GoTo 15


If m4 = -1 And y > 38 And y < 48 And x > 238 And x < 254 And round <> 3 + bp(cpl) And ra = 0 Then ra = 1: l1 = 0: p1 = 0: For i = 0 To 5: Line (22, 38 + i)-(210, 38 + i), 0: Next i: For t = 1 To 10: PSet ((20 * t) + 4, 18), 15: Draw "c15e4g2h2f4": _SndPlay click&: d(t) = 1: _Delay .2: Next t: GoTo 5
If m4 = -1 And y > 38 And y < 48 And x > 238 And x < 254 And round <> 3 + bp(cpl) And ra = 1 Then ra = 0: l1 = 0: p1 = 0: For i = 0 To 5: Line (22, 38 + i)-(210, 38 + i), 0: Next i: For t = 1 To 10: PSet ((20 * t) + 4, 18), 0: Draw "c0e4g2h2f4": _SndPlay click&: d(t) = 0: _Delay .2: Next t: GoTo 5

If m4 = -1 And y > 38 And y < 48 And x > 222 And x < 238 And round <> 3 + bp(cpl) Then l1 = 0 Else GoTo mca

p1 = 0: For i = 0 To 5: Line (22, 38 + i)-(210, 38 + i), 0: Next i
For t = 1 To 10: If rp(t) = 1 Then PSet ((20 * t) + 4, 18), 15: Draw "e4g2h2f4": _SndPlay click&: d(t) = 1: _Delay .2
Next t: GoTo 5

mca:
If m4 = -1 And x > 309 And y < 11 Then 80
If m4 = -1 And x > 309 And y > 187 Then 8000

d = 1: Do: If m4 = -1 And y > 20 And y < 36 And x > 20 * d And x < 14 + (d * 20) Then 7
d = d + 1: Loop Until d = 11

GoTo 5



7 Rem ********** Select for Discard
p1 = 0: For i = 0 To 5: Line (22, 38 + i)-(210, 38 + i), 0: Next i: ra = 0: l1 = 0: If round = 3 + bp(cpl) Then 5
_SndPlay click&
p1 = 0: If d(d) = 1 Then d(d) = 0: PSet ((20 * d) + 4, 18), 0: Draw "c0e4g2h2f4": d(d) = 0: GoTo 5
PSet ((20 * d) + 4, 18), 15: Draw "c15e4g2h2f4": d(d) = 1: GoTo 5



10 Rem ********* SWITCH
l1 = 0: ra = 0: _SndPlay click&
For i = 1 To 10: d(i) = 0: Next i: For i = 0 To 5: Line (22, 14 + i)-(210, 14 + i), 0: Next i
If p1 = 0 Then p1 = p: PSet ((20 * p) + 2, 40), 15: Draw "c15e2g2f2h2r8h2f2g2": GoTo 5
PSet ((20 * p) + 2, 40), 15: Draw "c15e2g2f2h2r8h2f2g2": _Delay .2: P2 = cards(cpl, p1): cards(cpl, p1) = cards(cpl, p): cards(cpl, p) = P2
p1 = 0: sort = 0: GoTo 4



12 Rem ********* Sort
p1 = 0: l1 = 0: ra = 0: _SndPlay click&
For i = 0 To 5: Line (22, 14 + i)-(210, 14 + i), 0: Next i
If sort < 2 Then 13

sort = 1
For t = 1 To 10: st1(t) = cards(cpl, t)
    If st1(t) > 13 And st1(t) < 27 Then st1(t) = st1(t) - 13
    If st1(t) > 39 And st1(t) < 53 Then st1(t) = st1(t) - 13
    If st1(t) > 65 And st1(t) < 79 Then st1(t) = st1(t) - 13
    If st1(t) > 91 And st1(t) < 105 Then st1(t) = st1(t) - 13
    If st1(t) > 117 Then st1(t) = st1(t) - 13
Next t
For t = 1 To 9
    For y = t + 1 To 10
        If st1(y) < st1(t) Then c = st1(y): st1(y) = st1(t): st1(t) = c: c = cards(cpl, y): cards(cpl, y) = cards(cpl, t): cards(cpl, t) = c
Next y, t
GoTo 4

13 sort = 2
For t = 1 To 10: st1(t) = cards(cpl, t): Do Until st1(t) < 14: st1(t) = st1(t) - 13: Loop
Next t
For t = 1 To 9
    For y = t + 1 To 10
        If st1(y) < st1(t) Then c = st1(y): st1(y) = st1(t): st1(t) = c: c = cards(cpl, y): cards(cpl, y) = cards(cpl, t): cards(cpl, t) = c
Next y, t
GoTo 4















15 Rem ********* Draw Cards

For t = 1 To 10: rp(t) = d(t): Next t
l1 = 0: ra = 0: sort = 0: If round = 3 + bp(cpl) Then 5
For i = 0 To 4: Line (22, 38 + i)-(210, 38 + i), 0: Line (217, 26 + i)-(247, 26 + i), 0: Next i
p1 = 0: y = 20
For t = 1 To 10: If d(t) = 1 Then PSet ((20 * t) + 4, 18), 0: Draw "c0e4g2h2f4": Circle ((t * 20) + 6, 28), 10, 4
Next t

16 m2 = 2: t1 = 0

Do

    m1 = _MouseInput: m1 = _MouseButton(1) + _MouseButton(2)
    If m1 = -1 And m2 = 0 Then m2 = 1
    If m1 = 0 Then m2 = 0

    For t = 1 To 10
        If d(t) = 1 Then t1 = t1 + 1: c = Rand%(13): x = t * 20: cc = cco(Rand%(5)): GoSub 3000
    Next t

    t = Rand%(5): PSet (17 + ((t - 1) * 42) + (Rand%(31) - 1), Rand%(3) + 8), cco(t) + ((15 - cco(t)) * (Rand%(2) - 1))

Loop Until m2 = 1 Or t1 > 1000000

t = 0: Do: t = t + 1: Loop Until d(t) = 1
d(t) = 0: Do: c = Rand%(130): Loop Until deck(c) <> 0
cards(cpl, t) = deck(c): deck(c) = 0: c = cards(cpl, t)

For i = 1 To 5: If c > (i - 1) * 26 And c < (i * 26) + 1 Then cc = cco(i)
Next i: Do Until c < 14: c = c - 13: Loop: x = t * 20: y = 20: _SndPlay click&: GoSub 3000

If d(1) + d(2) + d(3) + d(4) + d(5) + d(6) + d(7) + d(8) + d(9) + d(10) = 0 Then round = round + 1: GoTo 4

GoTo 16















30 Rem *** SELECT CELL CHECK LEGALITY AND ENTER SCORE
p1 = 0: l1 = 0: ra = 0: _SndPlay click&: For t = 1 To 10: d(t) = 0: Next t: p1 = 0: p = 0: d = 0: P2 = 0: x1 = 0: y1 = 0: x2 = 0: y2 = 0: sort = 0: c = 10: GoSub 4000

Do: m1 = _MouseInput + _MouseButton(1) + _MouseButton(2): Loop Until m1 = 0
Do: m1 = _MouseInput: m2 = _MouseX: m3 = _MouseY: m4 = _MouseButton(1): m5 = _MouseButton(2)
    x = m2: y = m3
    For t = 1 To 14
        If x < 105 And y > 41 + (t * 10) And y < 51 + (t * 10) Then x1 = 49: y1 = 46 + (t * 10)
        If x > 104 And y > 41 + (t * 10) And y < 51 + (t * 10) Then x1 = 210: y1 = 46 + (t * 10)
    Next t
    If x2 <> 0 And x1 + y1 <> x2 + y2 Then PSet (x2, y2), 0: Draw "c0e2g2f2h2r5"
    If x1 <> 0 Then PSet (x1, y1), 4: Draw "c4e2g2f2h2r5": x2 = x1: y2 = y1
Loop Until m4 = -1

If m4 = -1 And x > 309 And y < 11 Then 80
If x > 309 And y > 187 Then 8000

If x2 = 0 Or y2 = 0 Then 30
If x < x2 Or x > x2 + 8 Then 30
If y < y2 - 3 Or y > y2 + 3 Then 30

PSet (x2, y2), 0: Draw "c0e2g2f2h2r5"

s = 0: If x2 > 100 Then s = 14
s = s + (y2 - 46) / 10

If s < 15 GoTo aaa
On s - 14 GOTO aao, aap, aaq, aar, aas, aat, aau, aav, aaw, aax, aay, aaz, aba, abb
















35 Rem **** Give hint and validate score

If hnt = 1 Then s = 1

aaa: Rem ****** ACES - ROYALS
a = 0: For t = 1 To 10: c = cards(cpl, t): Do Until c < 14: c = c - 13: Loop
    If c = s Then a = a + c
    If s = 14 And (c = 1 Or c > 9) Then a = a + c
Next t
If hnt = 1 And a >= 4 * s Then PSet (42, 46 + (s * 10)), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then s = s + 1: If s < 15 GoTo aaa
If hnt = 1 GoTo aao
If score(cpl, s) <> -1 Then 30
score(cpl, s) = a: GoTo 60


aao: Rem ****** THREE PAIR
s = 15: a = 0: For t = 1 To 13: SC1(t) = 0: Next t
For t = 1 To 10: c = cards(cpl, t): Do Until c < 14: c = c - 13: Loop
SC1(c) = SC1(c) + 1: a = a + c: Next t
a1 = 0: For t = 1 To 13: If SC1(t) > 1 Then a1 = a1 + 1
Next t
If hnt = 1 And a1 > 2 Then PSet (203, 56), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo aap
If score(cpl, s) <> -1 Then 30
If a1 > 2 Then score(cpl, s) = a Else score(cpl, s) = 0
GoTo 60

aap: Rem ****** FOUR PAIR
s = 16: a = 0: For t = 1 To 13: SC1(t) = 0: Next t
For t = 1 To 10: c = cards(cpl, t): Do Until c < 14: c = c - 13: Loop
SC1(c) = SC1(c) + 1: a = a + c: Next t
a1 = 0: For t = 1 To 13: If SC1(t) > 1 Then a1 = a1 + 1
Next t
If hnt = 1 And a1 > 3 Then PSet (203, 66), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo aaq
If score(cpl, s) <> -1 Then 30
If a1 > 3 Then score(cpl, s) = a Else score(cpl, s) = 0
GoTo 60

aaq: Rem ****** FOUR ALIKE
s = 17: a = 0: For t = 1 To 13: SC1(t) = 0: Next t
For t = 1 To 10: c = cards(cpl, t): Do Until c < 14: c = c - 13: Loop
SC1(c) = SC1(c) + 1: a = a + c: Next t
a1 = 0: For t = 1 To 13: If SC1(t) > 3 Then a1 = 1
Next t
If hnt = 1 And a1 = 1 Then PSet (203, 76), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo aar
If score(cpl, s) <> -1 Then 30
If a1 = 1 Then score(cpl, s) = a Else score(cpl, s) = 0
GoTo 60

aar: Rem ****** FIVE ALIKE
s = 18: a = 0: For t = 1 To 13: SC1(t) = 0: Next t
For t = 1 To 10: c = cards(cpl, t): Do Until c < 14: c = c - 13: Loop
SC1(c) = SC1(c) + 1: a = a + c: Next t
a1 = 0: For t = 1 To 13: If SC1(t) > 4 Then a1 = 1
Next t
If hnt = 1 And a1 = 1 Then PSet (203, 86), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo aas
If score(cpl, s) <> -1 Then 30
If a1 = 1 Then score(cpl, s) = a Else score(cpl, s) = 0
GoTo 60

aas: Rem ****** SIX CARD FLUSH
s = 19: For t = 1 To 5: sc2(t) = 0: Next t: a1 = 0
For t = 1 To 10: c = cards(cpl, t)
    If c > 0 And c < 27 Then sc2(1) = sc2(1) + 1
    If c > 26 And c < 53 Then sc2(2) = sc2(2) + 1
    If c > 52 And c < 79 Then sc2(3) = sc2(3) + 1
    If c > 78 And c < 105 Then sc2(4) = sc2(4) + 1
    If c > 104 And c < 131 Then sc2(5) = sc2(5) + 1
    Next t: For t = 1 To 5: If sc2(t) > 5 Then a1 = 1
Next t
If hnt = 1 And a1 = 1 Then PSet (203, 96), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo aat
If a1 = 1 And bn99 = 1 And score(cpl, s) > 0 Then score(cpl, s) = score(cpl, s) + 50: _SndPlay bonus&: GoTo 60
If a1 = 1 And score(cpl, s) = -1 Then score(cpl, s) = 100: GoTo 60
If score(cpl, s) = -1 Then score(cpl, s) = 0: GoTo 60
GoTo 30

aat: Rem ****** STRAIGHT FLUSH
s = 20: a1 = 0: For y = 1 To 105 Step 26: For t = 1 To 13: SC1(t) = 0: Next t
    For t = 1 To 10: c = cards(cpl, t): If c >= y And c < y + 26 Then Do Until c < 14: c = c - 13: Loop: SC1(c) = SC1(c) + 1
        Next t: For t = 0 To 8: If 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, y
If hnt = 1 And a1 = 1 Then PSet (203, 106), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo aau
If a1 = 1 And bn99 = 1 And score(cpl, s) > 0 Then score(cpl, s) = score(cpl, s) + 125: _SndPlay bonus&: GoTo 60
If a1 = 1 And score(cpl, s) = -1 Then score(cpl, s) = 250: GoTo 60
If score(cpl, s) = -1 Then score(cpl, s) = 0: GoTo 60
GoTo 30

aau: Rem ****** ROYAL FLUSH
s = 21: a1 = 0: For t = 1 To 10: sc2(t) = 0: Next t: For t = 1 To 10: c = cards(cpl, t): a1 = c: Do Until a1 < 14: a1 = a1 - 13: Loop
    If (a1 = 1 Or a1 > 9) And c < 27 Then sc2(1) = sc2(1) + 1
    If (a1 = 1 Or a1 > 9) And (c > 26 And c < 53) Then sc2(2) = sc2(2) + 1
    If (a1 = 1 Or a1 > 9) And (c > 52 And c < 79) Then sc2(3) = sc2(3) + 1
    If (a1 = 1 Or a1 > 9) And (c > 78 And c < 105) Then sc2(4) = sc2(4) + 1
    If (a1 = 1 Or a1 > 9) And c > 104 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 hnt = 1 And a1 = 1 Then PSet (203, 116), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo aav
If a1 = 1 And bn99 = 1 And score(cpl, s) > 0 Then score(cpl, s) = score(cpl, s) + 250: _SndPlay bonus&: GoTo 60
If a1 = 1 And score(cpl, s) = -1 Then score(cpl, s) = 500: GoTo 60
If score(cpl, s) = -1 Then score(cpl, s) = 0: GoTo 60
GoTo 30

aav: Rem ****** ROYAL UNFLUSH
s = 22: a1 = 0: For t = 1 To 10: sc2(t) = 0: Next t: For t = 1 To 10: c = cards(cpl, t): a1 = c: Do Until a1 < 14: a1 = a1 - 13: Loop
    If (a1 = 1 Or a1 > 9) And c < 27 Then sc2(1) = sc2(1) + 1
    If (a1 = 1 Or a1 > 9) And (c > 26 And c < 53) Then sc2(2) = sc2(2) + 1
    If (a1 = 1 Or a1 > 9) And (c > 52 And c < 79) Then sc2(3) = sc2(3) + 1
    If (a1 = 1 Or a1 > 9) And (c > 78 And c < 105) Then sc2(4) = sc2(4) + 1
    If (a1 = 1 Or a1 > 9) And c > 104 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 hnt = 1 And a1 = 1 Then PSet (203, 126), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo aaw
If a1 = 1 And bn99 = 1 And score(cpl, s) > 0 Then score(cpl, s) = score(cpl, s) + 250: _SndPlay bonus&: GoTo 60
If a1 = 1 And score(cpl, s) = -1 Then score(cpl, s) = 500: GoTo 60
If score(cpl, s) = -1 Then score(cpl, s) = 0: GoTo 60
GoTo 30

aaw: Rem ****** SIX STRAIGHT
s = 23: a1 = 0: For t = 1 To 13: SC1(t) = 0: Next t: For t = 1 To 10: c = cards(cpl, t): Do Until c < 14: c = c - 13: Loop
    SC1(c) = SC1(c) + 1: Next t: For t = 0 To 7: If 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 hnt = 1 And a1 = 1 Then PSet (203, 136), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo aax
If a1 = 1 And bn99 = 1 And score(cpl, s) > 0 Then score(cpl, s) = score(cpl, s) + 50: _SndPlay bonus&: GoTo 60
If a1 = 1 And score(cpl, s) = -1 Then score(cpl, s) = 100: GoTo 60
If score(cpl, s) = -1 Then score(cpl, s) = 0: GoTo 60
GoTo 30

aax: Rem ****** SEVEN STRAIGHT
s = 24: a1 = 0: For t = 1 To 13: SC1(t) = 0: Next t: For t = 1 To 10: c = cards(cpl, t): Do Until c < 14: c = c - 13: Loop
    SC1(c) = SC1(c) + 1: Next t: For t = 0 To 6: If 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 And SC1(7 + t) > 0 Then a1 = 1
Next t
If hnt = 1 And a1 = 1 Then PSet (203, 146), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo aay
If a1 = 1 And bn99 = 1 And score(cpl, s) > 0 Then score(cpl, s) = score(cpl, s) + 125: _SndPlay bonus&: GoTo 60
If a1 = 1 And score(cpl, s) = -1 Then score(cpl, s) = 250: GoTo 60
If score(cpl, s) = -1 Then score(cpl, s) = 0: GoTo 60
GoTo 30

aay: Rem ****** ROYAL STRAIGHT
s = 25: a1 = 0: For t = 1 To 13: SC1(t) = 0: Next t: For t = 1 To 10: c = cards(cpl, t): Do Until c < 14: c = c - 13: Loop
SC1(c) = SC1(c) + 1: Next t: If SC1(1) > 0 And SC1(10) > 0 And SC1(11) > 0 And SC1(12) > 0 And SC1(13) > 0 Then a1 = 1
If hnt = 1 And a1 = 1 Then PSet (203, 156), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo aaz
If a1 = 1 And bn99 = 1 And score(cpl, s) > 0 Then score(cpl, s) = score(cpl, s) + 250: _SndPlay bonus&: GoTo 60
If a1 = 1 And score(cpl, s) = -1 Then score(cpl, s) = 500: GoTo 60
If score(cpl, s) = -1 Then score(cpl, s) = 0: GoTo 60
GoTo 30

aaz: Rem ****** FULLER HOUSE
s = 26: a1 = 0: For t = 1 To 13: SC1(t) = 0: Next t: For t = 1 To 10: c = cards(cpl, t): Do Until c < 14: c = c - 13: Loop
    SC1(c) = SC1(c) + 1: Next t: For t = 1 To 13: 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 hnt = 1 And a1 > 1 Then PSet (203, 166), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo aba
If a1 > 1 And bn99 = 1 And score(cpl, s) > 0 Then score(cpl, s) = score(cpl, s) + 88: _SndPlay bonus&: GoTo 60
If a1 > 1 And score(cpl, s) = -1 Then score(cpl, s) = 175: GoTo 60
If score(cpl, s) = -1 Then score(cpl, s) = 0: GoTo 60
GoTo 30

aba: Rem ****** CHANCE
s = 27: a = 0: For t = 1 To 10: c = cards(cpl, t): Do Until c < 14: c = c - 13: Loop: a = a + c: Next t
If hnt = 1 Then PSet (203, 176), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then GoTo abb
If score(cpl, s) <> -1 Then 30
score(cpl, s) = a
GoTo 60


abb: Rem ****** YOKER
s = 28: a1 = 0: For y = 0 To 104 Step 26: For t = 1 To 13: SC1(t) = 0: Next t: For t = 1 To 10: c = cards(cpl, t)
        If c > y + 13 And c < y + 27 Then c = c - 13
        If c > y And c < y + 27 Then SC1(c - y) = SC1(c - y) + 1
    Next t: If SC1(1) > 0 And SC1(10) > 0 And SC1(11) > 0 And SC1(12) > 0 And SC1(13) > 0 Then a1 = 1
Next y
If hnt = 1 And a1 = 1 Then PSet (203, 186), 4: Draw "c0bd2r4l4u2c4e2g2f2h2r4"
If hnt = 1 Then hnt = 0: Return
If a1 = 1 And score(cpl, s) > 0 Then score(cpl, s) = score(cpl, s) + 1000: _SndPlay bonus&: GoTo 60
If a1 = 1 And score(cpl, s) = -1 Then score(cpl, s) = 2000: GoSub 6000: GoTo 60
If score(cpl, s) = -1 Then score(cpl, s) = 0: GoTo 60
GoTo 30






















60 Rem ****** Update scoresheet and select next player *******
If score(cpl, s) = 0 Then _SndPlay zero& Else _SndPlay eor&
c = 10: GoSub 4000: _Delay 2
For t = 1 To 10: d(t) = 0: rp(t) = 0: Next t
EG = 0

62 cpl = cpl + 1: If cpl > pl Then cpl = 1
For t = 1 To 28: If score(cpl, t) = -1 Then 3
Next t: EG = EG + 1: If EG > pl Then 80
GoTo 62














80 Rem ******** END GAME
_SndStop angel&
_SndPlay gameover&: _Delay 2
_SndLoop angel&
Cls: Do: Loop Until InKey$ = ""

For t = 1 To pl
    rp(t) = 1500: st = 0: For y = 1 To 28: If score(t, y) <> -1 Then st = st + score(t, y)
        If score(t, y) < 1 Then rp(t) = 0
        If y = 14 And st > 349 Then st = st + 1500
    Next y
    s1$ = Str$(st + rp(t)): s1$ = Right$(s1$, Len(s1$) - 1): s$ = Left$("    ", 5 - Len(s1$)) + s1$
    H$(4 + t) = pl$(t) + Left$("        ", 9 - Len(pl$(t))) + s$
Next t

For t = 1 To 3 + pl: For y = t + 1 To 4 + pl
        s1 = Val(Right$(H$(t), 5)): s2 = Val(Right$(H$(y), 5)): If s2 > s1 Then s$ = H$(t): H$(t) = H$(y): H$(y) = s$
Next y, t

Open "o", #2, "Data\YokerScores": Print #2, 0: For t = 1 To 4: Print #2, H$(t): Next t: Close #2

For t = 1 To pl: d(t) = 0: For y = 1 To 28: If score(t, y) <> -1 Then d(t) = d(t) + score(t, y)
        If y = 14 And d(t) > 349 Then d(t) = d(t) + 1500
Next y: d(t) = d(t) + rp(t): Next t

For t = 1 To 4: n1$(t) = pl$(t): Next t

For t = 1 To pl - 1: For y = t + 1 To pl
        If d(y) > d(t) Then s = d(t): d(t) = d(y): d(y) = s: r = rp(t): rp(t) = rp(y): rp(y) = r: n$ = n1$(t): n1$(t) = n1$(y): n1$(y) = n$
Next y, t

For t = 1 To pl: s1$ = Str$(d(t)): s1$ = Right$(s1$, Len(s1$) - 1)
    s$ = n1$(t) + Left$("          ", 9 - Len(n1$(t))) + Left$("    ", 5 - Len(s1$)) + s1$
    cs$(t) = s$: If rp(t) = 1500 Then cs$(t) = cs$(t) + "<NGZ"
Next t

a1$ = "Yoker V" + Right$(Str$(v), Len(Str$(v)) - 1) + "  By David Coterel": a2$ = "Press SPACE to End"
a3$ = "Game Scores...": a4$ = "High Scores..."
Do: _Limit 500

    x = ((Rand%(16) - 1) * 20) + 3: y = 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = 303: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = ((Rand%(16) - 1) * 20) + 3: y = 182: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000
    x = 3: y = ((Rand%(10) - 1) * 20) + 2: cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000

    a = Rand%(Len(a1$)): Locate 4, 6 + a: Color Rand%(15): Print Mid$(a1$, a, 1);
    a = Rand%(Len(a2$)): Locate 6, 11 + a: Color Rand%(15): Print Mid$(a2$, a, 1);
    a = Rand%(Len(a3$)): Locate 10, a + 3: Color Rand%(15): Print Mid$(a3$, a, 1);
    a = Rand%(Len(a4$)): Locate 10, 23 + a: Color Rand%(15): Print Mid$(a4$, a, 1);
    x = Rand%(14): y = Rand%(4): Locate 11 + y * 2, 23 + x: Color Rand%(15): Print Mid$(H$(y), x, 1);
    y = Rand%(4): x = Rand%(Len(cs$(y))): Locate 11 + y * 2, 3 + x: Color Rand%(15): Print Mid$(cs$(y), x, 1);
Loop Until InKey$ = " "
Screen 12: Cls: _SndStop (angel&)

_SndPlay click&
Color 15: Locate 1, 1: Print "Yoker V" + Right$(Str$(v), Len(Str$(v)) - 1) + " By Dave Coterel (2023) - Final Scoresheet:"
For t = 1 To 8: d(t) = 0: Next t

For y = 1 To 4: rp(y) = 1500: For t = 1 To 28
        If score(y, t) = -1 Then score(y, t) = 0
        If score(y, t) < 1 Then rp(y) = 0
Next t, y

Locate 3, 1
Color 6: Print "Player 1: ";: Color 15: Print pl$(1);
If pl > 1 Then Color 6: Print "    Player 2: ";: Color 15: Print pl$(2);
If pl > 2 Then Color 6: Print "    Player 3: ";: Color 15: Print pl$(3);
If pl > 3 Then Color 6: Print "    Player 4: ";: Color 15: Print pl$(4);

For t = 1 To 14: For y = 1 To 4: d(y) = d(y) + score(y, t): d(y + 4) = d(y + 4) + score(y, t + 14): Next y

    Print

    Color 9: Locate 4 + t, 1: Print Using "\          \ ##### ##### ##### #####  \            \  ##### ##### ##### #####"; fs$(t), score(1, t), score(2, t), score(3, t), score(4, t), fs$(t + 14), score(1, t + 14), score(2, t + 14), score(3, t + 14), score(4, t + 14)
Next t
For t = 1 To 4: If d(t) > 349 Then SC1(t) = 1500 Else SC1(t) = 0
Next t
Color 12: Locate 20, 1: Print Using "Sub Totals  ##### ##### ##### #####                    ##### ##### ##### #####"; d(1), d(2), d(3), d(4), d(5), d(6), d(7), d(8)
Color 11: Locate 21, 1: Print Using "LC Bonuses  ##### ##### ##### #####"; SC1(1), SC1(2), SC1(3), SC1(4)
Color 11: Locate 22, 1: Print Using "NGZ Bonuses  ##### ##### ##### #####"; rp(1), rp(2), rp(3), rp(4)
Color 15: Locate 24, 1: Print Using "Game Totals: ##### ##### ##### #####"; d(1) + d(5) + rp(1) + SC1(1), d(2) + d(6) + rp(2) + SC1(2), d(3) + d(7) + rp(3) + SC1(3), d(4) + d(8) + rp(4) + SC1(4)

Sleep
_SndPlay click&
End
















100 Rem ***** Draw letters and numbers *****
c$ = "c" + Str$(c): For z = 1 To Len(a$): a = Asc(Mid$(UCase$(a$), z, 1))
    If a > 47 And a < 58 Then On a - 47 GOTO 200, 210, 220, 230, 240, 250, 260, 270, 280, 290
    If a > 64 And a < 91 Then On a - 64 GOTO 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550
    If a = 46 Then PSet (x, y), c: PSet (x + 2, y), c: PSet (x + 4, y), c: GoTo 105
    If a = 32 Then PSet (x, y), 0: Draw "c0r4u1l4u1r4u1l4u1r4"
    If a = 58 Then PSet (x, y), 0: Draw "c0r4l4u2c4e2g2f2h2r4"
105 x = x + 7: Next z: Return
200 PSet (x, y), c: Draw c$ + "U4R4D4L4": GoTo 105
210 PSet (x, y), c: Draw c$ + "R4L2U4L1": GoTo 105
220 PSet (x, y), c: Draw c$ + "R4L4U2R4U2L4": GoTo 105
230 PSet (x, y), c: Draw c$ + "R4U2L2R2U2L4": GoTo 105
240 PSet (x, y), 0: Draw c$ + "BU4D2R4U2D4": GoTo 105
250 PSet (x, y), c: Draw c$ + "R4U2L4U2R4": GoTo 105
260 PSet (x, y), c: Draw c$ + "U4R4L4D4R4U2L3": GoTo 105
270 PSet (x, y), c: Draw c$ + "E4L4": GoTo 105
280 PSet (x, y), c: Draw c$ + "R4U2L4D2U4R4D1": GoTo 105
290 PSet (x, y), 0: Draw c$ + "BU4R4D4U2L4U1": GoTo 105
300 PSet (x, y), c: Draw c$ + "U3E1R2F1D3U2L3": GoTo 105
310 PSet (x, y), c: Draw c$ + "U4R3F1G1L2R2F1G1L2": GoTo 105
320 PSet (x, y), 0: Draw c$ + "BR4L3H1U2E1R3": GoTo 105
330 PSet (x, y), c: Draw c$ + "R3L3U4R3F1D2": GoTo 105
340 PSet (x, y), c: Draw c$ + "R4L4U2R2L2U2R4": GoTo 105
350 PSet (x, y), c: Draw c$ + "U4R4L4D2R2": GoTo 105
360 PSet (x, y), c: Draw c$ + "U4R4L4D4R4U2L1": GoTo 105
370 PSet (x, y), c: Draw c$ + "U4D2R4U2D4": GoTo 105
380 PSet (x, y), c: Draw c$ + "R4L2U4R2L4": GoTo 105
390 PSet (x, y), c: Draw c$ + "U1D1R4U4": GoTo 105
400 PSet (x, y), c: Draw c$ + "U4D2R2E2G2F2": GoTo 105
410 PSet (x, y), c: Draw c$ + "U4D4R4": GoTo 105
420 PSet (x, y), c: Draw c$ + "U4R2D2U2R2D4": GoTo 105
430 PSet (x, y), c: Draw c$ + "U4f4u4": GoTo 105
440 PSet (x, y), 0: Draw c$ + "BU1U2E1R2F1D2G1L2": GoTo 105
450 PSet (x, y), c: Draw c$ + "U4R4D2L3": GoTo 105
460 PSet (x, y), 0: Draw c$ + "BU3D2F1R1E2G1F1H1E1U1H1L2": GoTo 105
470 PSet (x, y), c: Draw c$ + "U4R4D2L3F2R1": GoTo 105
480 PSet (x, y), c: Draw c$ + "R3E1H1L2H1E1R3": GoTo 105
490 PSet (x, y), 0: Draw c$ + "BU4R4L2D4": GoTo 105
500 PSet (x, y), 0: Draw c$ + "BU4D3F1R2E1U3": GoTo 105
510 PSet (x, y), 0: Draw c$ + "Br2H1U1H1U1D1F1D1F1E1U1E1U1": GoTo 105
520 PSet (x, y), c: Draw c$ + "U4D4R2U2D2R2U4": GoTo 105
530 PSet (x, y), c: Draw c$ + "E4G2H2F4": GoTo 105
540 PSet (x, y), 0: Draw c$ + "br2U2L1H1U1D1F1R2E1U1": GoTo 105
550 PSet (x, y), c: Draw c$ + "R4L4E4L4": GoTo 105




600 Rem ****** Draw little numbers
c$ = "c" + Str$(c)
For i = 1 To Len(a$): If Mid$(a$, i, 1) = " " Then 620
    PSet (x + (i * 4), y), 0
    On Asc(Mid$(a$, i, 1)) - 47 GOTO 602, 603, 604, 605, 606, 607, 608, 609, 610, 611
    602 Draw "c0r2d1l2d1r2d1l2d1r2u4l2" + c$ + "r2d4l2u4": GoTo 620
    603 Draw "c0r2d1l2d1r2d1l2d1r2u4l2" + c$ + "br1d4": GoTo 620
    604 Draw "c0r2d1l2d1r2d1l2d1r2u4l2" + c$ + "r2d2l2d2r2": GoTo 620
    605 Draw "c0r2d1l2d1r2d1l2d1r2u4l2" + c$ + "r2d2l1r1d2l2": GoTo 620
    606 Draw "c0r2d1l2d1r2d1l2d1r2u4l2" + c$ + "d2r2u2d4": GoTo 620
    607 Draw "c0r2d1l2d1r2d1l2d1r2u4l2" + c$ + "r2l2d2r2d2l2": GoTo 620
    608 Draw "c0r2d1l2d1r2d1l2d1r2u4l2" + c$ + "d4r2u2l2": GoTo 620
    609 Draw "c0r2d1l2d1r2d1l2d1r2u4l2" + c$ + "r2d4": GoTo 620
    610 Draw "c0r2d1l2d1r2d1l2d1r2u4l2" + c$ + "r2d2l2u1d3r2u2": GoTo 620
    611 Draw "c0r2d1l2d1r2d1l2d1r2u4l2" + c$ + "r2d4u2l2u2": GoTo 620
620 Next i: Return




3000 Rem ****** Draw cards ******
Circle (x + 6, y + 8), 9, 15: Paint (x + 1, y + 3), cc, 15
On c GOTO 3020, 3030, 3040, 3050, 3060, 3070, 3080, 3090, 3100, 3110, 3120, 3130, 3140
3020 PSet (x, y), 0: Draw "BF4R4F1D7U4L6D4U7E1": GoTo 3200
3030 PSet (x, y), 0: Draw "BF4L1R6D4L6D4R6": GoTo 3200
3040 PSet (x, y), 0: Draw "bf4l1r6d4l3r3d4l6": GoTo 3200
3050 PSet (x, y), 0: Draw "bf4bl1d4r6u4d8": GoTo 3200
3060 PSet (x, y), 0: Draw "bf4r5l6d4r6d4l6": GoTo 3200
3070 PSet (x, y), 0: Draw "bf4bl1d8r6u4l5": GoTo 3200
3080 PSet (x, y), 0: Draw "bf4bl1r6d1g3d4": GoTo 3200
3090 PSet (x, y), 0: Draw "bf4r5d8l6u4r5l5u4": GoTo 3200
3100 PSet (x, y), 0: Draw "bf4l1d4r6u4l4r4d8": GoTo 3200
3110 PSet (x, y), 0: Draw "bf4bl1d8br2u8r4d8l4": GoTo 3200
3120 PSet (x, y), 0: Draw "bf4br5d8l6u2": GoTo 3200
3130 PSet (x, y), 0: Draw "bf4r5d5g1d1f1h1l1g1l3u8": GoTo 3200
3140 PSet (x, y), 0: Draw "bf4bl1d8u2e6g4f4": GoTo 3200
3200 Return




4000 Rem ***** Draw screen *****
Cls: For t = 1 To 10: d(t) = 0: Next t: p1 = 0
For t = 1 To 14
    a$ = Left$("    ", 6 - Len(fs$(t))) + fs$(t) + ".        " + Left$("          ", 14 - Len(fs$(t + 14))) + fs$(t + 14) + ".": x = 0: y = 48 + (t * 10): GoSub 100
Next t
a$ = "ROUND  PLAYER            HIGH SCORE      ": c = 6: x = 0: y = 5: GoSub 100
a$ = Str$(round): c = 15: x = 35: y = 5: GoSub 100
a$ = Right$(Str$(cpl), 1) + " " + pl$(cpl): x = 105: y = 5: c = 15: GoSub 100
hs = Val(Right$(H$(1), 5)): a$ = Str$(hs): a$ = Right$(a$, Len(a$) - 1): x = 259: a$ = Left$("    ", 5 - Len(a$)) + a$: y = 5: c = 15: GoSub 100
For t = 1 To 10: x = t * 20: y = 20: c = cards(cpl, t)
    For i = 1 To 5: If c > (i - 1) * 26 And c < (i * 26) + 1 Then cc = cco(i)
    Next i: Do Until c < 14: c = c - 13: Loop
GoSub 3000: Next t
hnt = 1: GoSub 35

For t = 1 To 5: Line (17 + ((t - 1) * 42), 9)-(47 + ((t - 1) * 42), 11), cco(t), BF
    i = 0: For y = 1 To 10: If cards(cpl, y) > (t - 1) * 26 And cards(cpl, y) < 27 + ((t - 1) * 26) Then i = i + 1
    Next y: Line (17 + ((t - 1) * 42), 10)-(17 + ((t - 1) * 42) + (i * 3), 10), 15
    i = 0: For y = 1 To 10
        If cards(cpl, y) = 1 + ((t - 1) * 26) Or (cards(cpl, y) > ((t - 1) * 26) + 9 And cards(cpl, y) < 14 + ((t - 1) * 26)) Then i = i + 1
        If cards(cpl, y) = 14 + ((t - 1) * 26) Or (cards(cpl, y) > ((t - 1) * 26) + 22 And cards(cpl, y) < 27 + ((t - 1) * 26)) Then i = i + 1
Next y: Line (17 + ((t - 1) * 42) + (i * 3), 9)-(17 + ((t - 1) * 42) + (i * 3), 11), 15: Next t

If sort = 1 Then PSet (217, 30), 4: Draw "r2u2l2u2r2br2d4r2u4br2r2l1d4l1r2br3u4l1r2"
If sort = 2 Then PSet (217, 30), 4: Draw "u4r2d2l1d1f1br2u4r2d2l1r1d2br2u4r2d4br2u4d2r1d1f1h1u1e1u1"
PSet (239, 39), 15: Draw "r14d8l14u7": Paint (240, 40), 2, 15: PSet (241, 41), 0: Draw "d4u4r2d2l1r1d2br2u4d4r2br2r2l2u4"
PSet (223, 39), 15: Draw "r14d8l14u7": Paint (224, 40), 2, 15: PSet (225, 41), 0: Draw "d4u4r2d2l1d1f1 br2u4r2l2d2r1l1d2r2 br2u4r2d2l1"
PSet (1, 26), 4: Draw "r2l2d2r2d2l2br4u4r2d4l1br3u4r2d2l1d1f1br3u4l1r2"
PSet (255, 13), 15: Draw "r39d14l39u13": Paint (260, 14), 1, 15
PSet (260, 22), 15: Draw "r4u2l4u2r4 br2 r4l4d4r4 br2 u4r4d4l4 br6 u4r4d2l3r1f2 br2 r4l4u2r2l2u2r4"
PSet (255, 36), 15: Draw "r39d14l39u13": Paint (258, 38), 4, 15
PSet (263, 45), 15: Draw "u4r3f1d2g1l2 br5 u1d1u4r3f1g1l2f2r1 br2 u1d1u3e1r2f1d1l3r3d2 br2 u4d3f1e1u1d1f1r1u4"
PSet (272, 65), 1: Draw "C1R1D3L1U3R1D3F1R3L1D4L1U4R2E1U3R1D3 BD9 C2 D6G1L5H1U6E1R5D7L5U6R6 BD10"
Draw "C3 BL1R1D1L1U1D1G1L1D1R1L5U3R1D8L1U4R3L1D1R3L1D1R1F1D1E1D1 BD3 C4 BL1L5D1L1D6R1D1R5U1R1L6U3R3L3U3R6 BD10"
Draw "C5 BL1L6D8R1U7R1L1D2R1D1R4U3L1R2D2L2D1L3D1R2D1R2L1D1R2D1L1 BD5 BL22"
Draw "C6 D4R3E1H1L3U2R3F1 BR2 C7 U1D1F1R1D2U2R1E1U1 BR8 C8 D4R3E1U2H1L3 BR7 C9 R2F1D3U2L4D2U3E1 BR5"
Draw "C10 D2F2E2U2 BR2 C11 R4L4D2R2L2D2R4 BD4 BL40 C12 R4L4D4R4 BR3 C13 R2E1U2H1L2G1D2F1 BR7 C14 U4L2R4 BR2"
Draw "C15 R4L4D2R2L2D2R4 BR2 C1 U4R3F1G1L2F2R1 BR2 C2 R4L4U2R2L2U2R4 BR2 C3 D4R4"
PSet (310, 196), 15: Draw "c15 u4e3r3f3d4g3l3h3 br3 r3u2l3u2r3": Paint (312, 196), 4, 15
PSet (310, 7), 15: Draw "c15 u4e3r3f3d4g3l3h3 br3 r3l3u2r2l2u2r3": Paint (312, 7), 2, 15
PSet (292, 65), 15: Draw "c15r2l1d4br3u4r2d2l1r1d2br2r2l2u4br4d4r2br3u2l1u2d2r2u2"
If boss = 1 Then PSet (286, 110), 4: Draw "U4R1F1G1F1G1BR4H1U2E1F1D2BG1BR3R1E1H2E1R1BR4L1G1F2G1L1BR4U4R1D1U1R1D4BR3H1U2E1F1D2G1BR3U4R1F1D2G1BR4R1L1H1U1R1L1U1E1R1"
For t = 1 To 4: a$ = Str$(t): a$ = Right$(a$, 1): c = Rand%(14)
    st = 0: For i = 1 To 28: If score(t, i) <> -1 Then st = st + score(t, i)
        If i = 14 And st > 349 Then st = st + 1500
    Next i: b$ = Str$(st): b$ = Right$(b$, Len(b$) - 1): a$ = a$ + Left$("    ", 6 - Len(b$)) + b$
    x = 284: y = 66 + t * 6: GoSub 600
Next t: PSet (292, 74), 15: Draw "r1bd6l1bd6r1bd6l1"
st = 0: For i = 1 To 14: If score(cpl, i) <> -1 Then st = st + score(cpl, i)
Next i: a$ = "BONUS": c = 4: x = 271: y = 163: GoSub 100
If st < 350 Then bonus = 0: a$ = Str$(350 - st): a$ = Right$(a$, Len(a$) - 1): a$ = Right$("  .", 4 - Len(a$)) + a$: c = 8: x = 278: y = 170: GoSub 100
If st > 349 And bp(cpl) = 0 Then bp(cpl) = 3: _SndPlay siren&: _Delay 3
If st > 349 Then bonus = 1500: a$ = "1500": c = 15: x = 278: y = 170: GoSub 100
If bp(cpl) = 3 Then a$ = ".....bonus rounds activated.....": c = 14: x = 49: y = 199: GoSub 100
st = 0: For i = 1 To 28: If score(cpl, i) <> -1 Then st = st + score(cpl, i)
Next i: a$ = "SCORE": c = 9: x = 271: y = 178: GoSub 100
a$ = Str$(st + bonus): a$ = Right$(a$, Len(a$) - 1): a$ = Left$("    ", 5 - Len(a$)) + a$
c = 15: x = 271: y = 185: GoSub 100
For t = 1 To 28: x = 49: If t > 14 Then x = 217
    y = 48 + (t * 10): If t > 14 Then y = 48 + ((t - 14) * 10)
    a$ = Str$(score(cpl, t)): a$ = Right$(a$, Len(a$) - 1): a$ = Left$("    ", 5 - Len(a$)) + a$
    If score(cpl, t) <> -1 Then c = 15: GoSub 100
Next t: Return




6000 Rem ****** Yoker Effect
_SndPlay app&: t$ = Time$: t = 0: Cls: a$ = "Y O K E R"
Do
    x = 129: y = 102: c = Rand%(14): GoSub 100
    x = ((Rand%(16) - 1) * 20) + 3: y = ((Rand%(10) - 1) * 20) + 2
    If (x < 123 Or x > 183) Or (y < 82 Or y > 102) Then cc = cco(Rand%(5)): c = Rand%(13): GoSub 3000: _Delay .001
    If t$ <> Time$ Then t = t + 1: t$ = Time$
Loop Until t > 10
Return




7000 Rem ****** ERROR TRAPPING
Screen 12: Cls
If Err = 53 Then Close #2: GoTo start
Color 15: Print "An error has occured"; Err: Print "At line number"; Erl: End




8000 Rem ****** Boss Mode
Open "o", #2, "Data\YokerScores"

Print #2, 1
For t = 1 To 4: Print #2, H$(t): Next t
For t = 1 To 10: Print #2, rp(t): Next t
For t = 1 To 10: Print #2, d(t): Next t
For t = 1 To 10: Print #2, sc2(t): Next t
For t = 1 To 28: Print #2, fs$(t): Next t
For t = 1 To 5: Print #2, cco(t): Next t
For t = 1 To 8: Print #2, H$(t): Next t
For t = 1 To 4: Print #2, pl$(t): Next t
For t = 1 To 4: Print #2, n1$(t): Next t
For t = 1 To 4: Print #2, bp(t): Next t
For t = 1 To 130: Print #2, deck(t): Next t
For t = 1 To 4: For y = 1 To 10: Print #2, cards(t, y): Next y, t
For t = 1 To 4: For y = 1 To 28: Print #2, score(t, y): Next y, t
For t = 1 To 13: Print #2, SC1(t): Next t
Print #2, round: Print #2, cpl: Print #2, pl
Print #2, bn99: Close #2
System


Rem ****** Random Number Generator
Function Rand% (Num): Rand% = Int(Rnd(1) * Num) + 1
End Function


Attached Files
.zip   Yoker QB.zip (Size: 13.76 MB / Downloads: 112)
Reply


Messages In This Thread
Yoker - Original by David Coterel - by dcoterel - 07-19-2025, 05:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Yoker... A Yahtzee / Poker twist (newest) dcoterel 0 403 07-12-2025, 05:29 AM
Last Post: dcoterel

Forum Jump:


Users browsing this thread: 1 Guest(s)