Author Topic: Lucky Numbers Board Game  (Read 3259 times)

0 Members and 1 Guest are viewing this topic.

Offline Donald Foster

  • Newbie
  • Posts: 63
    • View Profile
Lucky Numbers Board Game
« on: October 23, 2021, 06:48:28 pm »
 
Lucky Numbers.png


 Hello Everyone,

          Lucky Numbers is a 2 to 4 strategy board game played with individual boards and decks of cards based on the number of players. There is a solo play version, however, I did not not include it here.  Each board has spaces 4 across by 4 down to hold numbered cards. Each deck of cards are numbered from 1 to 20 and there is a deck of cards for each number of players. In example: 2 decks of cards for 2 players, 3 decks of cards for 3 players and 4 decks of cards for 4 players. The object of the game is to be the first player to completely fill your board with the numbered cards.

           The game starts with each player has a n empty gameboard in front of them. All the decks of cards are shuffled together. There are 4 starting cards placed on each gameboard at the start of the game that are randomly drawn from the deck. The cards are placed in ascending order from the lowest place in the upper left corner position 1:1, the next lowest placed at position 2:2, then the next lowest at position 3:3 and the highest card place at the lower right corner position 4:4. There's an optional version, known as Michael's Version, where only one card is reveled at a time and each player places that card at one of the 4 starting locations they feel is the best spot for that card without looking at any of the face down cards. Then the player turns over the next card in the same manner until all 4 cards are placed in the 4 starting positions.

           Cards can only be placed on the board in ascending order from top to bottom and from left to right with the lowest in the upper left corner to the highest in the lower tight corner and no 2 cards with the same number may be next to each other, up and down or side by side. A player may choose to draw a face down card off the top of the deck or play a face up card discarded face up on the table. Once a player draws a face down card from the deck, they stuck with card and can not play a card from the table. If the card drawn from the deck is playable, they may play it on their board or place it on to the table. You may also replace a card on your board with the card you drew from  the deck or from the table if it is playable in that spot. The card you removed from your board goes to the table.

          The sequence of play: You will be asked number of players, use keyboard for input. Then it will ask to use Michael's Variation, again keyboard input. There will be a thick cursor around the game board board of the player currently taking their turn. At the start of the game, that will be player 1. There is a cursor around the deck of cards indicating thru van draw a card from the deck. The card will appear next to the deck. If there are any cards on the table, there will be a cursor around the the group. To choose a card from the table, click anywhere inside the table cursor, the click on the card you wish to play. A cursor will surround only that card. You van play this card onto your board by clicking the spot on the board or you can select a different table card by re-clicking the card you selected and choose a different or draw a card from the deck.

          I've included 2 different copies copies of the rules.

Hope you enjoy playing, Donald

        
* Lucky Numbers.bas (Filesize: 19.67 KB, Downloads: 218)
« Last Edit: October 25, 2021, 10:36:14 pm by Donald Foster »

Offline Donald Foster

  • Newbie
  • Posts: 63
    • View Profile
Re: Lucky Numbers Board Game
« Reply #1 on: October 25, 2021, 10:54:47 pm »
Hello Everyone,
           I had to fix a few bugs in the Michael's Version. I had a problem with the game displaying the correct card color and fixed it but forgot to make the changes in Michael's Version. Also, the cursor around the table cards kept lingering even though there were no cards on the table. So' the cursor is fixed. I replaced the Lucky Numbers.bas file in the original post. I have also included the code here also:

Code: QB64: [Select]
  1. _Title "Lucky Numbers - Coded by Donald L. Foster Jr."
  2.  
  3. Screen _NewImage(1035, 735, 256)
  4.  
  5.  
  6. _PaletteColor 1, _RGB32(0, 0, 90) '      Blue Playing Board
  7. _PaletteColor 2, _RGB32(0, 155, 155) '   Cyan Board Spacer
  8. _PaletteColor 3, _RGB32(235, 195, 0) '   Gold Card
  9. _PaletteColor 4, _RGB32(50, 185, 30) '   Green Card
  10. _PaletteColor 5, _RGB32(32, 110, 170) '  Blue Card
  11. _PaletteColor 6, _RGB32(138, 43, 226) '  Purple Card
  12.  
  13.  
  14.  
  15. Dim Player As Integer
  16. Dim Players As Integer
  17. Dim Column As Integer
  18. Dim Winner As Integer
  19. Dim CardColor As Integer
  20. Dim Board As Integer
  21. Dim Variation As Integer
  22. Dim DeckCards As Integer
  23. Dim TableCards As Integer
  24. Dim PlayCard As Integer
  25. Dim PlayColor As Integer
  26. Dim OldCard As Integer
  27. Dim OldColor As Integer
  28. Dim LowCard As Integer
  29. Dim Occupied As Integer
  30. Dim CanPlay As Integer
  31. Dim DrawPile As Integer
  32. Dim Table As Integer
  33. Dim Position As Integer
  34. Dim Routine As Integer
  35.  
  36. Dim DeckColor(80) As Integer
  37. Dim DeckCard(80) As Integer
  38. Dim CardColor(5) As Integer
  39. Dim Placed(80) As Integer
  40. Dim BoardCenterX(5) As Integer
  41. Dim BoardCenterY(5) As Integer
  42. Dim TableCard(12) As Integer
  43. Dim TableColor(12) As Integer
  44. Dim TableX(12) As Integer
  45. Dim TableY(12) As Integer
  46.  
  47. Dim HoldCard(4, 4) As Integer
  48. Dim HoldColor(4, 4) As Integer
  49. Dim Sorted(4, 4) As Integer
  50. Dim BoardX(5, 4, 4) As Integer
  51. Dim BoardY(5, 4, 4) As Integer
  52. Dim BoardCard(5, 4, 4) As Integer
  53. Dim BoardColor(5, 4, 4) As Integer
  54.  
  55. CardColor(1) = 3: CardColor(2) = 4: CardColor(3) = 5: CardColor(4) = 6
  56.  
  57. fontpath$ = Environ$("SYSTEMROOT") + "\fonts\Arialbd.ttf"
  58. fontpath1$ = Environ$("SYSTEMROOT") + "\fonts\Arial.ttf"
  59.  
  60. Color 2, 0: font& = _LoadFont(fontpath$, 80): _Font font&
  61. Locate 3, 295: Print "L  U  C  K  Y";
  62. Locate 5, 175: Print "N  U  M  B  E  R  S";
  63.  
  64. Color 15, 0: font& = _LoadFont(fontpath$, 30): _Font font&
  65. Locate 17, 315: Print "How Many Players?  ( 1 to 4 )";
  66.  
  67. GetPlayers:
  68. A$ = InKey$: If A$ = "" GoTo GetPlayers
  69. If Asc(A$) = 27 And FullScreen = 0 Then FullScreen = -1: _FullScreen _SquarePixels , _Smooth Else If Asc(A$) = 27 Then FullScreen = 0: _FullScreen _Off
  70. If Val(A$) < 1 Or Val(A$) > 4 GoTo GetPlayers
  71. Players = Val(A$)
  72.  
  73. ' Setup Deck of Cards
  74. DeckCards = Players * 20
  75. For Z = 1 To DeckCards: Placed(Z) = 0: Next
  76. For Z = 1 To 20
  77.     For Y = 1 To Players
  78.         Placed: X = Int(Rnd * DeckCards) + 1: If Placed(X) = 0 Then Placed(X) = 1: DeckCard(X) = Z: DeckColor(X) = Y Else GoTo Placed
  79.     Next
  80.  
  81.  
  82. ' Get Board X, Y Positions
  83. If Players = 4 Then
  84.  
  85.     X = 186: Board = 1
  86.     For Z = 1 To 2
  87.         W = 186
  88.         For Y = 1 To 2
  89.             U = X - 122
  90.             For T = 1 To 4
  91.                 V = W - 122
  92.                 For S = 1 To 4
  93.                     BoardX(Board, T, S) = V: BoardY(Board, T, S) = U
  94.                     V = V + 81
  95.                 Next
  96.                 U = U + 81
  97.             Next
  98.             BoardCenterX(Board) = W: BoardCenterY(Board) = X
  99.             Board = Board + 1
  100.             W = W + 363
  101.         Next
  102.         X = X + 363
  103.     Next
  104.  
  105. ElseIf Players = 3 Then
  106.  
  107.     X = 186: Board = 1
  108.     For Z = 1 To 2
  109.         If Z = 1 Then R = 2: W = 186 Else R = 1: W = 367
  110.         For Y = 1 To R
  111.             U = X - 122
  112.             For T = 1 To 4
  113.                 V = W - 122
  114.                 For S = 1 To 4
  115.                     BoardX(Board, T, S) = V: BoardY(Board, T, S) = U
  116.                     V = V + 81
  117.                 Next
  118.                 U = U + 81
  119.             Next
  120.             BoardCenterX(Board) = W: BoardCenterY(Board) = X
  121.             Board = Board + 1
  122.             W = W + 363
  123.         Next
  124.         X = X + 363
  125.     Next
  126.  
  127.  
  128.     X = 186: W = 186: Board = 1
  129.     For Z = 1 To 2
  130.         U = X - 122
  131.         For T = 1 To 4
  132.             V = W - 122
  133.             For S = 1 To 4
  134.                 BoardX(Board, T, S) = V: BoardY(Board, T, S) = U
  135.                 V = V + 81
  136.             Next
  137.             U = U + 81
  138.         Next
  139.         BoardCenterX(Board) = W: BoardCenterY(Board) = X
  140.         Board = Board + 1
  141.         X = X + 363: W = W + 363
  142.     Next
  143.  
  144.  
  145. ' Draw Board
  146. For Z = 1 To Players
  147.     V = BoardCenterX(Z): U = BoardCenterY(Z)
  148.     Line (V - 175, U - 175)-(V + 175, U + 175), 1, BF
  149.     For Y = 1 To 4
  150.         For X = 1 To 4
  151.             X1 = BoardX(Z, Y, X): X2 = BoardY(Z, Y, X): X3 = 0: X4 = 0: DrawCard X1, X2, X3, X4
  152.         Next
  153.     Next
  154.  
  155. ' Setup Table Locations
  156. X = 1: V = 360
  157. For Z = 1 To 4
  158.     U = 800
  159.     For Y = 1 To 3
  160.         TableX(X) = U: TableY(X) = V
  161.         X = X + 1: U = U + 81
  162.     Next
  163.     V = V + 81
  164.  
  165. Color 2, 0: font& = _LoadFont(fontpath$, 25): _Font font&
  166. _PrintString (812, 10), "L  U  C  K  Y"
  167. _PrintString (774, 35), "N  U  M  B  E  R  S"
  168.  
  169. Color 15, 0: font& = _LoadFont(fontpath$, 16): _Font font&
  170. Locate 45, 760: Print "Use Michael's Variation?  Y or N";
  171.  
  172. GetVariation:
  173. A$ = UCase$(InKey$): If A$ = "" GoTo GetVariation
  174. If Asc(A$) = 27 And FullScreen = 0 Then FullScreen = -1: _FullScreen _SquarePixels , _Smooth Else If Asc(A$) = 27 Then FullScreen = 0: _FullScreen _Off
  175. If A$ = "Y" Then Variation = 1 Else If A$ = "N" Then Variation = 0 Else GoTo GetVariation
  176.  
  177. ' Add Starting Cursors for Michael's Variation
  178. If Variation = 1 Then
  179.  
  180.     For Z = 1 To Players
  181.         For R = 1 To 4
  182.             Color 15, 0: font& = _LoadFont(fontpath1$, 16): _Font font&
  183.             Locate 45, 750: Print "   Place Starting Card on Your Board   ";
  184.  
  185.             V = BoardCenterX(Z): U = BoardCenterY(Z)
  186.             Line (V - 176, U - 176)-(V + 176, U + 176), 15, B
  187.  
  188.             For Y = 1 To 4
  189.                 V = BoardX(Z, Y, Y): U = BoardY(Z, Y, Y)
  190.                 If BoardCard(Z, Y, Y) = 0 Then
  191.                     Line (V - 39, U - 39)-(V + 39, U + 39), 15, B
  192.                 Else
  193.                     Line (V - 39, U - 39)-(V + 39, U + 39), 1, B
  194.                 End If
  195.             Next
  196.  
  197.             X1 = 881: X2 = 110: X3 = Z: X4 = CardColor(Z): DrawCard X1, X2, X3, X4
  198.             Color 15, 0: font& = _LoadFont(fontpath$, 25): _Font font&
  199.             _PrintString (833, 155), "Player " + Str$(Z)
  200.  
  201.             Card = DeckCard(DeckCards): CardColor = DeckColor(DeckCards): DeckCards = DeckCards - 1
  202.             X1 = 881: X2 = 350: X3 = Card: X4 = CardColor(CardColor): DrawCard X1, X2, X3, X4
  203.  
  204.             PlaceStartingCard:
  205.             Do While _MouseInput
  206.                 For Y = 1 To 4
  207.                     For X = 1 To 4
  208.                         If BoardCard(Z, Y, X) = 0 And ((Y = 1 And X = 1) Or (Y = 2 And X = 2) Or (Y = 3 And X = 3) Or (Y = 4 And X = 4)) Then
  209.                             If _MouseX > BoardX(Z, Y, X) - 40 And _MouseX < BoardX(Z, Y, X) + 40 And _MouseY > BoardY(Z, Y, X) - 40 And _MouseY < BoardY(Z, Y, X) + 40 And _MouseButton(1) = -1 Then
  210.                                 GoSub ReleaseButton: Line (841, 310)-(921, 390), 0, BF
  211.                                 X1 = BoardX(Z, Y, X): X2 = BoardY(Z, Y, X): X3 = Card: X4 = CardColor(CardColor): DrawCard X1, X2, X3, X4
  212.                                 Line (BoardX(Z, Y, X) - 39, BoardY(Z, Y, X) - 39)-(BoardX(Z, Y, X) + 39, BoardY(Z, Y, X) + 39), 1, B
  213.                                 Line (BoardCenterX(Z) - 176, BoardCenterY(Z) - 176)-(BoardCenterX(Z) + 176, BoardCenterY(Z) + 176), 0, B
  214.                                 BoardCard(Z, Y, X) = Card: BoardColor(Z, Y, X) = CardColor: GoTo EndPlaceCard
  215.                             End If
  216.                         End If
  217.                     Next
  218.                 Next
  219.             Loop
  220.             A$ = InKey$: If A$ <> "" Then If Asc(A$) = 27 And FullScreen = 0 Then FullScreen = -1: _FullScreen _SquarePixels , _Smooth Else If Asc(A$) = 27 Then FullScreen = 0: _FullScreen _Off
  221.             GoTo PlaceStartingCard
  222.  
  223.             EndPlaceCard:
  224.         Next
  225.     Next
  226.  
  227.  
  228.     ' Get Hold Cards
  229.     For Z = 1 To 4
  230.         For Y = 1 To Players
  231.             HoldCard(Y, Z) = DeckCard(DeckCards): HoldColor(Y, Z) = DeckColor(DeckCards): DeckCards = DeckCards - 1
  232.         Next
  233.     Next
  234.  
  235.     ' Sort Hold Cards
  236.     For Z = 1 To Players
  237.         For Y = 1 To 4
  238.             LowCard = 100
  239.             For X = 1 To 4
  240.                 If HoldCard(Z, X) < LowCard And Sorted(Z, X) = 0 Then LowCard = HoldCard(Z, X): CardColor = HoldColor(Z, X): T = X
  241.             Next
  242.             Sorted(Z, T) = 1: X1 = BoardX(Z, Y, Y): X2 = BoardY(Z, Y, Y): X3 = LowCard: X4 = CardColor(CardColor): DrawCard X1, X2, X3, X4
  243.             BoardCard(Z, Y, Y) = LowCard: BoardColor(Z, Y, Y) = CardColor
  244.         Next
  245.     Next
  246.  
  247.  
  248. Player = 1: Winner = 0
  249.  
  250. StartGame:
  251. DrawPile = 0: Table = 0: Occupied = 0
  252.  
  253. ' Draw Player Cursor
  254. Line (BoardCenterX(Player) - 176, BoardCenterY(Player) - 176)-(BoardCenterX(Player) + 176, BoardCenterY(Player) + 176), 15, B
  255. Line (BoardCenterX(Player) - 177, BoardCenterY(Player) - 177)-(BoardCenterX(Player) + 177, BoardCenterY(Player) + 177), 15, B
  256.  
  257. X1 = 881: X2 = 110: X3 = Player: X4 = CardColor(Player): DrawCard X1, X2, X3, X4
  258. Color 15, 0: font& = _LoadFont(fontpath$, 25): _Font font&
  259. _PrintString (833, 155), "Player " + Str$(Player)
  260.  
  261. ' Display Deck
  262. X1 = 821: X2 = 240: X3 = 100: X4 = 0: DrawCard X1, X2, X3, X4: Line (777, 196)-(865, 284), 15, B
  263. Color 15, 0: font& = _LoadFont(fontpath1$, 16): _Font font&
  264. Locate 43, 750: Print "       Draw a Card From the Deck       ";
  265.  
  266. 'Draw Cursor Around Table If Not Empty
  267. If TableCards > 0 Then
  268.     Color 15, 0: Locate 45, 750: Print "     Or Play a Card From the Table       ";
  269.     Line (756, 316)-(1006, 646), 15, B
  270.     Locate 45, 750: Print String$(70, 32);: Line (756, 316)-(1006, 646), 0, B
  271.  
  272. ChooseAPlay:
  273.  
  274.     ' Draw a Card From the Deck
  275.     If _MouseX > 777 And _MouseX < 865 And _MouseY > 196 And _MouseY < 284 And _MouseButton(1) = -1 Then
  276.         GoSub ReleaseButton: Line (777, 196)-(865, 284), 0, B: Line (756, 316)-(1006, 646), 15, B
  277.         PlayCard = DeckCard(DeckCards): PlayColor = DeckColor(DeckCards): DeckCards = DeckCards - 1
  278.         X1 = 941: X2 = 240: X3 = PlayCard: X4 = CardColor(PlayColor): DrawCard X1, X2, X3, X4: GoTo PlayDeckCard
  279.     End If
  280.  
  281.     ' Choose Table Cards
  282.     If _MouseX > 756 And _MouseX < 1006 And _MouseY > 316 And _MouseY < 646 And _MouseButton(1) = -1 And TableCards > 0 Then
  283.         GoSub ReleaseButton: GoTo ChooseTableCard
  284.     End If
  285.  
  286. A$ = InKey$: If A$ <> "" Then If Asc(A$) = 27 And FullScreen = 0 Then FullScreen = -1: _FullScreen _SquarePixels , _Smooth Else If Asc(A$) = 27 Then FullScreen = 0: _FullScreen _Off
  287. GoTo ChooseAPlay
  288.  
  289. PlayDeckCard:
  290. Color 15, 0: font& = _LoadFont(fontpath1$, 16): _Font font&
  291. Locate 43, 750: Print "         Play Card on Your Board         ";
  292. Locate 45, 750: Print "        Or Move Card to the Table        ";
  293.  
  294. ChoosePlay:
  295.  
  296.     ' Place Card on Table
  297.     If _MouseX > 756 And _MouseX < 1006 And _MouseY > 316 And _MouseY < 646 And _MouseButton(1) = -1 Then
  298.         GoSub ReleaseButton: Line (897, 196)-(985, 284), 0, BF: Line (756, 316)-(1006, 646), 0, B:
  299.         TableCards = TableCards + 1: TableCard(TableCards) = PlayCard: TableColor(TableCards) = PlayColor:
  300.         X1 = TableX(TableCards): X2 = TableY(TableCards): X3 = PlayCard: X4 = CardColor(PlayColor): DrawCard X1, X2, X3, X4: GoTo EndTurn
  301.     End If
  302.  
  303.     ' Place Card on Board
  304.     For Z = 1 To 4
  305.         For Y = 1 To 4
  306.             If _MouseX > BoardX(Player, Z, Y) - 35 And _MouseX < BoardX(Player, Z, Y) + 35 And _MouseY > BoardY(Player, Z, Y) - 35 And _MouseY < BoardY(Player, Z, Y) + 35 And _MouseButton(1) = -1 Then
  307.                 GoSub ReleaseButton: Row = Z: Column = Y: DrawPile = 1: Table = 0: Routine = 1: GoTo CheckBoardPosition
  308.             End If
  309.         Next
  310.     Next
  311.  
  312. A$ = InKey$: If A$ <> "" Then If Asc(A$) = 27 And FullScreen = 0 Then FullScreen = -1: _FullScreen _SquarePixels , _Smooth Else If Asc(A$) = 27 Then FullScreen = 0: _FullScreen _Off
  313. GoTo ChoosePlay
  314.  
  315.  
  316. ChooseTableCard:
  317. Color 15, 0: font& = _LoadFont(fontpath1$, 16): _Font font&
  318. Locate 43, 750: Print "       Choose a Table Card to Play       ";
  319. Locate 45, 750: Print "      Or Draw a Card From the Deck       ";
  320.  
  321. GetTableCard:
  322.  
  323.     ' Choose a Card From the Table
  324.     For Z = 1 To TableCards
  325.         If _MouseX > TableX(Z) - 35 And _MouseX < TableX(Z) + 35 And _MouseY > TableY(Z) - 35 And _MouseY < TableY(Z) + 35 And _MouseButton(1) = -1 Then
  326.             GoSub ReleaseButton: Line (756, 316)-(1006, 646), 0, B: Line (777, 196)-(865, 284), 0, B
  327.             Line (TableX(Z) - 41, TableY(Z) - 41)-(TableX(Z) + 41, TableY(Z) + 41), 15, B
  328.             PlayCard = TableCard(Z): PlayColor = TableColor(Z): Position = Z: Table = 1: DrawPile = 0: GoTo ChooseBoardPosition
  329.         End If
  330.     Next
  331.  
  332.     ' Choose Draw a Card From the Deck
  333.     If _MouseX > 777 And _MouseX < 865 And _MouseY > 196 And _MouseY < 284 And _MouseButton(1) = -1 Then
  334.         GoSub ReleaseButton: Line (777, 196)-(865, 284), 0, B: Line (756, 316)-(1006, 646), 15, B
  335.         PlayCard = DeckCard(DeckCards): PlayColor = DeckColor(DeckCards): DeckCards = DeckCards - 1
  336.         X1 = 941: X2 = 240: X3 = PlayCard: X4 = CardColor(PlayColor): DrawCard X1, X2, X3, X4: GoTo PlayDeckCard
  337.     End If
  338.  
  339. A$ = InKey$: If A$ <> "" Then If Asc(A$) = 27 And FullScreen = 0 Then FullScreen = -1: _FullScreen _SquarePixels , _Smooth Else If Asc(A$) = 27 Then FullScreen = 0: _FullScreen _Off
  340. GoTo GetTableCard
  341.  
  342. ChooseBoardPosition:
  343. Color 15, 0: font& = _LoadFont(fontpath1$, 16): _Font font&
  344. Locate 43, 750: Print "         Play Card on Your Board         ";
  345. If TableCards > 0 Then Locate 45, 750: Print "          Or a Choose Table Card         ";
  346.  
  347. GetBoardPosition:
  348.  
  349.     ' Reselect Card on Table
  350.     If _MouseX > TableX(Position) - 41 And _MouseX < TableX(Position) + 41 And _MouseY > TableY(Position) - 41 And _MouseY < TableY(Position) + 41 And _MouseButton(1) = -1 Then
  351.         GoSub ReleaseButton: Line (TableX(Position) - 41, TableY(Position) - 41)-(TableX(Position) + 41, TableY(Position) + 41), 0, B
  352.         Line (777, 196)-(865, 284), 15, B: Line (756, 316)-(1006, 646), 15, B: GoTo ChooseTableCard
  353.     End If
  354.  
  355.     ' Place Card on Board
  356.     For Z = 1 To 4
  357.         For Y = 1 To 4
  358.             If _MouseX > BoardX(Player, Z, Y) - 35 And _MouseX < BoardX(Player, Z, Y) + 35 And _MouseY > BoardY(Player, Z, Y) - 35 And _MouseY < BoardY(Player, Z, Y) + 35 And _MouseButton(1) = -1 Then
  359.                 GoSub ReleaseButton: Row = Z: Column = Y:: Routine = 2: GoTo CheckBoardPosition
  360.             End If
  361.         Next
  362.     Next
  363.  
  364. A$ = InKey$: If A$ <> "" Then If Asc(A$) = 27 And FullScreen = 0 Then FullScreen = -1: _FullScreen _SquarePixels , _Smooth Else If Asc(A$) = 27 Then FullScreen = 0: _FullScreen _Off
  365. GoTo GetBoardPosition
  366.  
  367.  
  368. CheckBoardPosition:
  369. If BoardCard(Player, Row, Column) > 0 Then Occupied = 1: OldCard = BoardCard(Player, Row, Column): OldColor = BoardColor(Player, Row, Column)
  370.  
  371. X = 1: X1 = 0: X2 = 0: X3 = 0: X4 = 0
  372.  
  373. Up: If Row - X >= 1 Then
  374.     If BoardCard(Player, Row - X, Column) = 0 Then X = X + 1: GoTo Up Else If PlayCard > BoardCard(Player, Row - X, Column) Then X1 = 1
  375.     X1 = 1
  376.  
  377. X = 1
  378. Dn: If Row + X <= 4 Then
  379.     If BoardCard(Player, Row + X, Column) = 0 Then X = X + 1: GoTo Dn Else If PlayCard < BoardCard(Player, Row + X, Column) Then X2 = 1
  380.     X2 = 1
  381.  
  382. X = 1
  383. Lt: If Column - X >= 1 Then
  384.     If BoardCard(Player, Row, Column - X) = 0 Then X = X + 1: GoTo Lt Else If PlayCard > BoardCard(Player, Row, Column - X) Then X3 = 1
  385.     X3 = 1
  386.  
  387. X = 1
  388. Rt: If Column + X <= 4 Then
  389.     If BoardCard(Player, Row, Column + X) = 0 Then X = X + 1: GoTo Rt Else If PlayCard < BoardCard(Player, Row, Column + X) Then X4 = 1
  390.     X4 = 1
  391.  
  392. CanPlay = 0
  393. If X1 = 1 And X2 = 1 And X3 = 1 And X4 = 1 Then
  394.     CanPlay = 1
  395.     If Routine = 1 Then GoTo ChoosePlay
  396.     If Routine = 2 Then GoTo GetBoardPosition
  397.  
  398. ' Place Card on Board
  399. If CanPlay = 1 Then
  400.  
  401.     ' Move Card to the Board
  402.     BoardCard(Player, Row, Column) = PlayCard: BoardColor(Player, Row, Column) = PlayColor
  403.     X1 = BoardX(Player, Row, Column): X2 = BoardY(Player, Row, Column): X3 = PlayCard: X4 = CardColor(PlayColor): DrawCard X1, X2, X3, X4
  404.  
  405.     ' Move Card from Draw Pile
  406.     If DrawPile = 1 Then Line (897, 196)-(985, 284), 0, BF
  407.  
  408.     ' Move Card from Table
  409.     If Table = 1 Then
  410.  
  411.         Line (TableX(Position) - 41, TableY(Position) - 41)-(TableX(Position) + 41, TableY(Position) + 41), 0, BF
  412.  
  413.         While Position < TableCards
  414.  
  415.             TableCard(Position) = TableCard(Position + 1): TableColor(Position) = TableColor(Position + 1)
  416.             Line (TableX(Position + 1) - 41, TableY(Position + 1) - 41)-(TableX(Position + 1) + 41, TableY(Position + 1) + 41), 0, BF
  417.             X1 = TableX(Position): X2 = TableY(Position): X3 = TableCard(Position): X4 = CardColor(TableColor(Position)): DrawCard X1, X2, X3, X4
  418.             Position = Position + 1
  419.  
  420.         Wend
  421.  
  422.         TableCards = TableCards - 1
  423.  
  424.     End If
  425.  
  426.     ' Move Old Card to Table
  427.     If Occupied = 1 Then
  428.         TableCards = TableCards + 1: TableCard(TableCards) = OldCard: TableColor(TableCards) = OldColor
  429.         X1 = TableX(TableCards): X2 = TableY(TableCards): X3 = OldCard: X4 = CardColor(OldColor): DrawCard X1, X2, X3, X4
  430.     End If
  431.  
  432.  
  433. EndTurn:
  434.  
  435. ' Check for Winner
  436. X = 0
  437. For Z = 1 To 4
  438.     For Y = 1 To 4
  439.         If BoardCard(Player, Z, Y) > 0 Then X = X + 1
  440.     Next
  441.  
  442. If X = 16 Then
  443.     Color 15, 0: font& = _LoadFont(fontpath1$, 16): _Font font&
  444.     Locate 43, 750: Print "            Player"; Player; "is the Winner!          ";
  445.     Locate 45, 750: Print "       Play Another Game?  Y or N        ";
  446.  
  447.     GetYorN: A$ = UCase$(InKey$): If A$ = "" GoTo GetYorN
  448.     If Asc(A$) = 27 And FullScreen = 0 Then FullScreen = -1: _FullScreen _SquarePixels , _Smooth Else If Asc(A$) = 27 Then FullScreen = 0: _FullScreen _Off
  449.     If A$ = "Y" Then Run
  450.     If A$ = "N" Then System
  451.     GoTo GetYorN
  452.  
  453. Line (BoardCenterX(Player) - 176, BoardCenterY(Player) - 176)-(BoardCenterX(Player) + 176, BoardCenterY(Player) + 176), 0, B
  454. Line (BoardCenterX(Player) - 177, BoardCenterY(Player) - 177)-(BoardCenterX(Player) + 177, BoardCenterY(Player) + 177), 0, B
  455.  
  456. If Player = Players Then Player = 1 Else Player = Player + 1
  457. GoTo StartGame
  458.  
  459. ReleaseButton:
  460.     If _MouseButton(1) = 0 Then Return
  461. GoTo ReleaseButton
  462.  
  463. Sub DrawCard (X1, X2, X3, X4)
  464.  
  465.     fontpath$ = Environ$("SYSTEMROOT") + "\fonts\Arialbd.ttf"
  466.  
  467.     Line (X1 - 34, X2 - 26)-(X1 - 34, X2 + 26), 2: Line (X1 + 34, X2 - 26)-(X1 + 34, X2 + 26), 2: Line (X1 - 26, X2 - 34)-(X1 + 26, X2 - 34), 2: Line (X1 - 26, X2 + 34)-(X1 + 26, X2 + 34), 2
  468.     Circle (X1 - 26, X2 - 26), 8, 2, 1.5, 3.0: Circle (X1 + 26, X2 - 26), 8, 2, 0, 1.6: Circle (X1 - 26, X2 + 26), 8, 2, 3.0, 4.8: Circle (X1 + 26, X2 + 26), 8, 2, 4.5,
  469.  
  470.     If X3 = 100 Then
  471.  
  472.         Paint (X1, X2), 15, 2: Color X4, 15: font& = _LoadFont(fontpath$, 13): _Font font&
  473.         Color 2, 15: _PrintString (804, 225), "Lucky": _PrintString (793, 245), "Numbers"
  474.  
  475.     ElseIf X3 > 0 Then
  476.  
  477.         Paint (X1, X2), 2
  478.         Line (X1 - 25, X2 - 22)-(X1 - 25, X2 + 22), 15: Line (X1 + 25, X2 - 22)-(X1 + 25, X2 + 22), 15: Line (X1 - 22, X2 - 25)-(X1 + 22, X2 - 25), 15: Line (X1 - 22, X2 + 25)-(X1 + 22, X2 + 25), 15
  479.         Circle (X1 - 22, X2 - 22), 3, 15, 1.5, 3.0: Circle (X1 + 22, X2 - 22), 3, 15, 0, 1.6: Circle (X1 - 22, X2 + 22), 3, 15, 3.0, 4.8: Circle (X1 + 22, X2 + 22), 3, 15, 4.5, 0
  480.         Paint (X1, X2), 15
  481.  
  482.  
  483.         Color X4, 15: font& = _LoadFont(fontpath$, 40): _Font font&
  484.         If X3 < 10 Then X = 20 Else X = 22
  485.         _PrintString (X1 - X, X2 - 15), Right$(Str$(X3), 2)
  486.  
  487.     End If
  488.  

Also, as in my other games, you can use ESC to alternate between window mode and full screen.

Thanks, Donald