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
Code: (Select All)
_Title"Lucky Numbers - Coded by Donald L. Foster Jr."
' Setup Deck of Cards
DeckCards = Players * 20 For Z = 1To DeckCards: Placed(Z) = 0: Next For Z = 1To20 For Y = 1To Players
Placed: X = Int(Rnd * DeckCards) + 1: If Placed(X) = 0Then Placed(X) = 1: DeckCard(X) = Z: DeckColor(X) = Y ElseGoTo Placed Next Next
X = 186: Board = 1 For Z = 1To2
W = 186 For Y = 1To2
U = X - 122 For T = 1To4
V = W - 122 For S = 1To4
BoardX(Board, T, S) = V: BoardY(Board, T, S) = U
V = V + 81 Next
U = U + 81 Next
BoardCenterX(Board) = W: BoardCenterY(Board) = X
Board = Board + 1
W = W + 363 Next
X = X + 363 Next
X = 186: Board = 1 For Z = 1To2 If Z = 1Then R = 2: W = 186Else R = 1: W = 367 For Y = 1To R
U = X - 122 For T = 1To4
V = W - 122 For S = 1To4
BoardX(Board, T, S) = V: BoardY(Board, T, S) = U
V = V + 81 Next
U = U + 81 Next
BoardCenterX(Board) = W: BoardCenterY(Board) = X
Board = Board + 1
W = W + 363 Next
X = X + 363 Next
X = 186: W = 186: Board = 1 For Z = 1To2
U = X - 122 For T = 1To4
V = W - 122 For S = 1To4
BoardX(Board, T, S) = V: BoardY(Board, T, S) = U
V = V + 81 Next
U = U + 81 Next
BoardCenterX(Board) = W: BoardCenterY(Board) = X
Board = Board + 1
X = X + 363: W = W + 363 Next
' Draw Board For Z = 1To Players
V = BoardCenterX(Z): U = BoardCenterY(Z) Line (V - 175, U - 175)-(V + 175, U + 175), 1, BF For Y = 1To4 For X = 1To4
X1 = BoardX(Z, Y, X): X2 = BoardY(Z, Y, X): X3 = 0: X4 = 0: DrawCard X1, X2, X3, X4 Next Next Next
' Setup Table Locations
X = 1: V = 360 For Z = 1To4
U = 800 For Y = 1To3
TableX(X) = U: TableY(X) = V
X = X + 1: U = U + 81 Next
V = V + 81 Next
V = BoardCenterX(Z): U = BoardCenterY(Z) Line (V - 176, U - 176)-(V + 176, U + 176), 15, B
For Y = 1To4
V = BoardX(Z, Y, Y): U = BoardY(Z, Y, Y) If BoardCard(Z, Y, Y) = 0Then Line (V - 39, U - 39)-(V + 39, U + 39), 15, B Else Line (V - 39, U - 39)-(V + 39, U + 39), 1, B End If Next
PlaceStartingCard: Do While_MouseInput For Y = 1To4 For X = 1To4 If BoardCard(Z, Y, X) = 0And ((Y = 1And X = 1) Or (Y = 2And X = 2) Or (Y = 3And X = 3) Or (Y = 4And X = 4)) Then If_MouseX > BoardX(Z, Y, X) - 40And_MouseX < BoardX(Z, Y, X) + 40And_MouseY > BoardY(Z, Y, X) - 40And_MouseY < BoardY(Z, Y, X) + 40And_MouseButton(1) = -1Then GoSub ReleaseButton: Line (841, 310)-(921, 390), 0, BF
X1 = BoardX(Z, Y, X): X2 = BoardY(Z, Y, X): X3 = Card: X4 = CardColor(CardColor): DrawCard X1, X2, X3, X4 Line (BoardX(Z, Y, X) - 39, BoardY(Z, Y, X) - 39)-(BoardX(Z, Y, X) + 39, BoardY(Z, Y, X) + 39), 1, B Line (BoardCenterX(Z) - 176, BoardCenterY(Z) - 176)-(BoardCenterX(Z) + 176, BoardCenterY(Z) + 176), 0, B
BoardCard(Z, Y, X) = Card: BoardColor(Z, Y, X) = CardColor: GoTo EndPlaceCard End If End If Next Next Loop
A$ = InKey$: If A$ <> ""ThenIfAsc(A$) = 27And FullScreen = 0Then FullScreen = -1: _FullScreen_SquarePixels , _SmoothElseIfAsc(A$) = 27Then FullScreen = 0: _FullScreen_Off GoTo PlaceStartingCard
' Get Hold Cards For Z = 1To4 For Y = 1To Players
HoldCard(Y, Z) = DeckCard(DeckCards): HoldColor(Y, Z) = DeckColor(DeckCards): DeckCards = DeckCards - 1 Next Next
' Sort Hold Cards For Z = 1To Players For Y = 1To4
LowCard = 100 For X = 1To4 If HoldCard(Z, X) < LowCard And Sorted(Z, X) = 0Then LowCard = HoldCard(Z, X): CardColor = HoldColor(Z, X): T = X Next
Sorted(Z, T) = 1: X1 = BoardX(Z, Y, Y): X2 = BoardY(Z, Y, Y): X3 = LowCard: X4 = CardColor(CardColor): DrawCard X1, X2, X3, X4
BoardCard(Z, Y, Y) = LowCard: BoardColor(Z, Y, Y) = CardColor Next Next
' Display Deck
X1 = 821: X2 = 240: X3 = 100: X4 = 0: DrawCard X1, X2, X3, X4: Line (777, 196)-(865, 284), 15, B Color15, 0: font& = _LoadFont(fontpath1$, 16): _Font font& Locate43, 750: Print" Draw a Card From the Deck ";
'Draw Cursor Around Table If Not Empty If TableCards > 0Then Color15, 0: Locate45, 750: Print" Or Play a Card From the Table "; Line (756, 316)-(1006, 646), 15, B Else Locate45, 750: PrintString$(70, 32);: Line (756, 316)-(1006, 646), 0, B End If
PlayDeckCard: Color15, 0: font& = _LoadFont(fontpath1$, 16): _Font font& Locate43, 750: Print" Play Card on Your Board "; Locate45, 750: Print" Or Move Card to the Table ";
ChooseTableCard: Color15, 0: font& = _LoadFont(fontpath1$, 16): _Font font& Locate43, 750: Print" Choose a Table Card to Play "; Locate45, 750: Print" Or Draw a Card From the Deck ";
ChooseBoardPosition: Color15, 0: font& = _LoadFont(fontpath1$, 16): _Font font& Locate43, 750: Print" Play Card on Your Board "; If TableCards > 0ThenLocate45, 750: Print" Or a Choose Table Card ";
Up: If Row - X >= 1Then If BoardCard(Player, Row - X, Column) = 0Then X = X + 1: GoTo Up ElseIf PlayCard > BoardCard(Player, Row - X, Column) Then X1 = 1 Else
X1 = 1 End If
X = 1
Dn: If Row + X <= 4Then If BoardCard(Player, Row + X, Column) = 0Then X = X + 1: GoTo Dn ElseIf PlayCard < BoardCard(Player, Row + X, Column) Then X2 = 1 Else
X2 = 1 End If
X = 1
Lt: If Column - X >= 1Then If BoardCard(Player, Row, Column - X) = 0Then X = X + 1: GoTo Lt ElseIf PlayCard > BoardCard(Player, Row, Column - X) Then X3 = 1 Else
X3 = 1 End If
X = 1
Rt: If Column + X <= 4Then If BoardCard(Player, Row, Column + X) = 0Then X = X + 1: GoTo Rt ElseIf PlayCard < BoardCard(Player, Row, Column + X) Then X4 = 1 Else
X4 = 1 End If
12-23-2023, 02:18 PM (This post was last modified: 12-23-2023, 02:25 PM by SMcNeill.)
Hello Everyone,
This is the completed version of Lucky Numbers board game including Solo Play. Solo Play is a puzzle game the challenges the player to try to complete 40 levels of play.
During the making of the Solo Play edition, my hard drive on my laptop crashed and won't load Windows. This was the only location where I had Solo Play with no other backups, only a few hand written notes. Unable to recover any data at this time, I simply downloaded the 2 to 4 player version from here and started over.
The Solo Play also includes some updates to the original 2 to 4 player version:
1 - I change the deck card back to a color one.
2 - When there are no cards on the table, the game automatically draws a card from the deck for the player.
3 - When choosing a table card, the player doesn't need to click in the large table cursor then click on the card, they only need to click on the card. A player can click on that card again to un-select it or even click on a different table card.
The Solo Play version as mentioned is a puzzle game with 40 levels. A player must complete the current level or highest level completed before attempting a harder level. You see, a player may play any level lower up yo their current level. There a can be 8 different players playing at their own level on a single device. They are identified by their name they enter at the start of their game.
Each level has a predetermined number of moves to complete the puzzle from 2 to 8. The puzzle starts off with the 16 cards already arranged on the board. However, a few of the cards are not in their correct position on the board. The player swaps pairs of cards at a time, a predetermined number of moves to complete the puzzle. If the puzzle was not successfully complete, they are required to restart that level. However, if they did complete the puzzle, they advance to the next puzzle. As players complete levels, their game is saved to HD.
When the game is first played on a device, there are no current players stored on HD and the player is asked to enter their name. That player starts at puzzle level 1 and must complete that level before going to level 2. After that first time the game is played, the game loads the current players and you choose your name. If you are a new player, you can select NEW PLAYER and the game will ask you to enter your name and you will start at level 1.
Cards can only be swapped next to each other (side by side or top and bottom) or at opposite ends of the board on the same row or column.
At any time during the play of a level, a player my choose to restart that level, choose a different level, choose a different player, quit the game or play solution.
If you choose to play solution, the game shows you all of the moves to complete the puzzle. Most puzzle games includes the solution to each puzzle, however, I could find one for this game. I included the first 8 levels in this game, but unable to complete level 9. If anyone plays this and able to complete more levels and wants to record the moves, please feel free to post the solutions.
Hope you enjoy playing. Donald
Code: (Select All)
_Title"Lucky Numbers - Coded by Donald L. Foster Jr."
' Setup Deck of Cards
DeckCards = Players * 20 For Z = 1To DeckCards: Placed(Z) = 0: Next For Z = 1To20 For Y = 1To Players
Placed: X = Int(Rnd * DeckCards) + 1: If Placed(X) = 0Then Placed(X) = 1: DeckCard(X) = Z: DeckColor(X) = Y ElseGoTo Placed Next Next
' Setup PlayerNameY()
V = 0: For Z = 1To8: PlayerNameY(Z) = 190 + V: Name$(Z) = "EMPTY": V = V + 50: Next
X = 186: Board = 1 For Z = 1To2
W = 186 For Y = 1To2
U = X - 122 For T = 1To4
V = W - 122 For S = 1To4
BoardX(Board, T, S) = V: BoardY(Board, T, S) = U
V = V + 81 Next
U = U + 81 Next
BoardCenterX(Board) = W: BoardCenterY(Board) = X
Board = Board + 1
W = W + 363 Next
X = X + 363 Next
X = 186: Board = 1 For Z = 1To2 If Z = 1Then R = 2: W = 186Else R = 1: W = 367 For Y = 1To R
U = X - 122 For T = 1To4
V = W - 122 For S = 1To4
BoardX(Board, T, S) = V: BoardY(Board, T, S) = U
V = V + 81 Next
U = U + 81 Next
BoardCenterX(Board) = W: BoardCenterY(Board) = X
Board = Board + 1
W = W + 363 Next
X = X + 363 Next
X = 186: W = 186: Board = 1 For Z = 1To2
U = X - 122 For T = 1To4
V = W - 122 For S = 1To4
BoardX(Board, T, S) = V: BoardY(Board, T, S) = U
V = V + 81 Next
U = U + 81 Next
BoardCenterX(Board) = W: BoardCenterY(Board) = X
Board = Board + 1
X = X + 363: W = W + 363 Next
X = 367: W = 367: Board = 1
U = X - 122 For T = 1To4
V = W - 122 For S = 1To4
BoardX(Board, T, S) = V: BoardY(Board, T, S) = U
V = V + 81 Next
U = U + 81 Next
BoardCenterX(Board) = W: BoardCenterY(Board) = X
' Draw Board For Z = 1To Players
V = BoardCenterX(Z): U = BoardCenterY(Z) Line (V - 175, U - 175)-(V + 175, U + 175), 1, BF For Y = 1To4 For X = 1To4
X1 = BoardX(Z, Y, X): X2 = BoardY(Z, Y, X): X3 = 0: X4 = 0: DrawCard X1, X2, X3, X4 Next Next Next
V = BoardCenterX(Z): U = BoardCenterY(Z) Line (V - 176, U - 176)-(V + 176, U + 176), 15, B
For Y = 1To4
V = BoardX(Z, Y, Y): U = BoardY(Z, Y, Y) If BoardCard(Z, Y, Y) = 0Then Line (V - 39, U - 39)-(V + 39, U + 39), 15, B Else Line (V - 39, U - 39)-(V + 39, U + 39), 1, B End If Next
PlaceStartingCard: Do While_MouseInput For Y = 1To4 For X = 1To4 If BoardCard(Z, Y, X) = 0And ((Y = 1And X = 1) Or (Y = 2And X = 2) Or (Y = 3And X = 3) Or (Y = 4And X = 4)) Then If_MouseX > BoardX(Z, Y, X) - 40And_MouseX < BoardX(Z, Y, X) + 40And_MouseY > BoardY(Z, Y, X) - 40And_MouseY < BoardY(Z, Y, X) + 40And_MouseButton(1) = -1Then GoSub ReleaseButton: Line (841, 310)-(921, 390), 0, BF
X1 = BoardX(Z, Y, X): X2 = BoardY(Z, Y, X): X3 = Card: X4 = CardColor(CardColor): DrawCard X1, X2, X3, X4 Line (BoardX(Z, Y, X) - 39, BoardY(Z, Y, X) - 39)-(BoardX(Z, Y, X) + 39, BoardY(Z, Y, X) + 39), 1, B Line (BoardCenterX(Z) - 176, BoardCenterY(Z) - 176)-(BoardCenterX(Z) + 176, BoardCenterY(Z) + 176), 0, B
BoardCard(Z, Y, X) = Card: BoardColor(Z, Y, X) = CardColor: GoTo EndPlaceCard End If End If Next Next Loop
A$ = InKey$: If A$ <> ""ThenIfAsc(A$) = 27And FullScreen = 0Then FullScreen = -1: _FullScreen_SquarePixels , _SmoothElseIfAsc(A$) = 27Then FullScreen = 0: _FullScreen_Off GoTo PlaceStartingCard
' Get Hold Cards For Z = 1To4 For Y = 1To Players
HoldCard(Y, Z) = DeckCard(DeckCards): HoldColor(Y, Z) = DeckColor(DeckCards): DeckCards = DeckCards - 1 Next Next
' Sort Hold Cards For Z = 1To Players For Y = 1To4
LowCard = 100 For X = 1To4 If HoldCard(Z, X) < LowCard And Sorted(Z, X) = 0Then LowCard = HoldCard(Z, X): CardColor = HoldColor(Z, X): T = X Next
Sorted(Z, T) = 1: X1 = BoardX(Z, Y, Y): X2 = BoardY(Z, Y, Y): X3 = LowCard: X4 = CardColor(CardColor): DrawCard X1, X2, X3, X4
BoardCard(Z, Y, Y) = LowCard: BoardColor(Z, Y, Y) = CardColor Next Next
'Draw Cursor Around Table If Not Empty If TableCards > 0And CardDrawn = 0Then Locate43, 750: Print" Draw a Card From the Deck "; Color15, 0: Locate45, 750: Print" or Play a Card From the Table "; Line (756, 316)-(1006, 646), 15, B: Line (777, 196)-(865, 284), 15, B Else Locate43, 750: Print" Play Card on Your Board "; Locate45, 750: Print" or Move Card to the Table "; Line (777, 196)-(865, 284), 0, B: Line (756, 316)-(1006, 646), 15, B End If
' Draw a Card From the Deck If_MouseX > 777And_MouseX < 865And_MouseY > 196And_MouseY < 284And_MouseButton(1) = -1Then GoSub ReleaseButton: Line (777, 196)-(865, 284), 0, B: Line (756, 316)-(1006, 646), 15, B
PlayCard = DeckCard(DeckCards): PlayColor = DeckColor(DeckCards): DeckCards = DeckCards - 1: DrawPile = 1: Table = 0
X1 = 941: X2 = 240: X3 = PlayCard: X4 = CardColor(PlayColor): DrawCard X1, X2, X3, X4: GoTo PlayDeckCard End If
' Choose a Card From the Table If CardDrawn = 0Then For Z = 1To TableCards If_MouseX > TableX(Z) - 35And_MouseX < TableX(Z) + 35And_MouseY > TableY(Z) - 35And_MouseY < TableY(Z) + 35And_MouseButton(1) = -1Then GoSub ReleaseButton: Line (756, 316)-(1006, 646), 0, B: Line (777, 196)-(865, 284), 0, B Line (TableX(Z) - 41, TableY(Z) - 41)-(TableX(Z) + 41, TableY(Z) + 41), 15, B
PlayCard = TableCard(Z): PlayColor = TableColor(Z): Position = Z: Table = 1: DrawPile = 0: GoTo PlayDeckCard End If Next End If
PlayDeckCard: Color15, 0: font& = _LoadFont(fontpath1$, 16): _Font font& Locate43, 750: Print" Play Card on Your Board or "; Locate45, 750: Print" Choose a Card From the Table ";
X = 0 For Z = 1To3 Color2, 0: Locate11 + X, 800: Print Menu$(ChooseLevelMenu(Z)) Line (790, PlayerNameY(Z + 1))-(977, PlayerNameY(Z + 1) + 40), 15, B
X = X + 2 Next
If Selected Then Line (790, PlayerNameY(Z + 1))-(977, PlayerNameY(Z + 1) + 40), 5, B Else Line (790, PlayerNameY(Z + 1))-(977, PlayerNameY(Z + 1) + 40), 15, B End If
X = 0 For Z = 1To5 Color2, 0: Locate11 + X, 800: Print Menu$(PlayLevelMenu(Z)) Line (790, PlayerNameY(Z + 1))-(977, PlayerNameY(Z + 1) + 40), 15, B
X = X + 2 Next
If Selected Then Line (790, PlayerNameY(Z + 1))-(977, PlayerNameY(Z + 1) + 40), 5, B Else Line (790, PlayerNameY(Z + 1))-(977, PlayerNameY(Z + 1) + 40), 15, B End If
' Restart Level If Z = 2Then GoSub EndLevel If EndTurn Then For X = 1To4 For Y = 1To4
X1 = BoardX(1, X, Y): X2 = BoardY(1, X, Y): X3 = SoloBoard(Level, X, Y): X4 = 6: DrawCard X1, X2, X3, X4
BoardCard(1, X, Y) = SoloBoard(levelevel, X, Y) Next Next
Move = 1 End If GoTo DisplayMove End If
If Selected Then Line (790, PlayerNameY(Z + 1))-(977, PlayerNameY(Z + 1) + 40), 5, B Else Line (790, PlayerNameY(Z + 1))-(977, PlayerNameY(Z + 1) + 40), 15, B End If
' Play Solution If Z = 1Then GoSub EndLevel If EndTurn Then Line (BoardX(1, Row1, Col1) - 38, BoardY(1, Row1, Col1) - 38)-(BoardX(1, Row1, Col1) + 38, BoardY(1, Row1, Col1) + 38), 1, B: GoSub PlaySolution: GoTo DisplayMove Else GoTo ChooseNextCard End If End If
' Restart Level If Z = 2Then GoSub EndLevel If EndTurn Then For X = 1To4 For Y = 1To4
X1 = BoardX(1, X, Y): X2 = BoardY(1, X, Y): X3 = SoloBoard(Level, X, Y): X4 = 6: DrawCard X1, X2, X3, X4
BoardCard(1, X, Y) = SoloBoard(levelevel, X, Y) Next Next
Move = 1 End If
' Check for Level Completed If Move = SoloMoves(Level) Then
V = 0: W = 1 For Z = 1To4 For Y = 1To4
PlayCard = BoardCard(1, Z, Y): Row = Z: Column = Y: GoSub CheckPosition: If X1 = 1And X2 = 1And X3 = 1And X4 = 1Then V = V + 1 Next Next
X = 0: V = 0 For Z = 1To Players + 1 Locate9 + X, 800: Color2, 0 If Z = Players + 1ThenPrint"NEW PLAYER"; ElsePrint Name$(Z) Line (790, PlayerNameY(Z))-(977, PlayerNameY(Z) + 40), 15, B
X = X + 2: V = V + 50 Next
X = 1
Dn: If Row + X <= 4Then If BoardCard(W, Row + X, Column) = 0Then X = X + 1: GoTo Dn ElseIf PlayCard < BoardCard(W, Row + X, Column) Then X2 = 1 Else
X2 = 1 End If
X = 1
Lt: If Column - X >= 1Then If BoardCard(W, Row, Column - X) = 0Then X = X + 1: GoTo Lt ElseIf PlayCard > BoardCard(W, Row, Column - X) Then X3 = 1 Else
X3 = 1 End If
X = 1
Rt: If Column + X <= 4Then If BoardCard(W, Row, Column + X) = 0Then X = X + 1: GoTo Rt ElseIf PlayCard < BoardCard(W, Row, Column + X) Then X4 = 1 Else
X4 = 1 End If Return
12-23-2023, 05:01 PM (This post was last modified: 12-23-2023, 05:03 PM by mnrvovrfc.)
(12-23-2023, 02:18 PM)SMcNeill Wrote: Hello Everyone,
This is the completed version of Lucky Numbers board game including Solo Play. Solo Play is a puzzle game the challenges the player to try to complete 40 levels of play.
During the making of the Solo Play edition, my hard drive on my laptop crashed and won't load Windows. This was the only location where I had Solo Play with no other backups, only a few hand written notes. Unable to recover any data at this time, I simply downloaded the 2 to 4 player version from here and started over.
Ouch. Better go easy on the egg nog for a while.
Thank you for this program. I have found something else to do on "The" Eve.
LOL just noticed Donald has his own forum. Congratulations. Keep bringing on the weird board games.