Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 502
» Latest member: abugarins
» Forum threads: 2,861
» Forum posts: 26,814

Full Statistics

Latest Threads
[split] Lines of Code
Forum: General Discussion
Last Post: mdijkens
37 minutes ago
» Replies: 12
» Views: 80
_CONSOLEINPUT is blocking
Forum: General Discussion
Last Post: mdijkens
1 hour ago
» Replies: 12
» Views: 170
[split] BAM and _IIF with...
Forum: QBJS, BAM, and Other BASICs
Last Post: CharlieJV
7 hours ago
» Replies: 8
» Views: 49
Who wants to PLAY?
Forum: QBJS, BAM, and Other BASICs
Last Post: dbox
10 hours ago
» Replies: 17
» Views: 294
QBJS v0.9.0 - Release
Forum: QBJS, BAM, and Other BASICs
Last Post: bplus
11 hours ago
» Replies: 23
» Views: 415
Curious if I am thinking ...
Forum: Help Me!
Last Post: bplus
11 hours ago
» Replies: 27
» Views: 606
ADPCM compression
Forum: Petr
Last Post: Petr
Yesterday, 09:37 PM
» Replies: 1
» Views: 58
Aloha from Maui guys.
Forum: General Discussion
Last Post: Pete
Yesterday, 07:33 PM
» Replies: 18
» Views: 519
Qix line monster
Forum: Programs
Last Post: bplus
Yesterday, 05:38 PM
» Replies: 1
» Views: 56
Trojan infection !
Forum: Help Me!
Last Post: PhilOfPerth
Yesterday, 09:14 AM
» Replies: 4
» Views: 107

 
  Jigsaw Puzzle of Jennifer Aniston - A Jigsaw Creation Demo.
Posted by: Pete - 04-26-2022, 09:46 PM - Forum: TheBOB - No Replies

Jennifer-Aniston-Puzzle.bas by Bob Seguin.
[Image: Screenshot-648.png]
Description: Demo that creates a jigsaw layout and applies it to a photo of American actress, Jennifer Aniston.

Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-Jennifer-Aniston-Puzzle".

Install: Compile Jennifer-Aniston-Puzzle.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".



Attached Files
.7z   TheBOB-Jennifer-Aniston-Puzzle-Creator-Demo.7z (Size: 61.55 KB / Downloads: 94)
Print this item

  Jigsaw Puzzle of Jennifer Aniston - A Jigsaw Creation Demo.
Posted by: Pete - 04-26-2022, 09:46 PM - Forum: Games - No Replies

Jennifer-Aniston-Puzzle.bas by Bob Seguin.
[Image: Screenshot-648.png]
Description: Demo that creates a jigsaw layout and applies it to a photo of American actress, Jennifer Aniston.

Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-Jennifer-Aniston-Puzzle".

Install: Compile Jennifer-Aniston-Puzzle.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".



Attached Files
.7z   TheBOB-Jennifer-Aniston-Puzzle-Creator-Demo.7z (Size: 61.55 KB / Downloads: 102)
Print this item

  Jigsaw Piece Creator - Turn Image into a Jigsaw Puzzle.
Posted by: Pete - 04-26-2022, 09:19 PM - Forum: TheBOB - No Replies

Jigsaw-Piece-Creator.bas by Bob Seguin.
[Image: Screenshot-637.png]
Description: This is a limited utility that demonstrates how an image can be mapped into a jigsaw puzzle.

Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-Jigsaw-Piece-Creator".

Install: Compile Jigsaw-Piece-Creator.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".



Attached Files
.7z   TheBOB-Jigsaw-Piece-Creator.7z (Size: 5.26 KB / Downloads: 87)
Print this item

  Jigsaw Piece Creator - Turn Image into a Jigsaw Puzzle.
Posted by: Pete - 04-26-2022, 09:19 PM - Forum: Games - No Replies

Jigsaw-Piece-Creator.bas by Bob Seguin.
[Image: Screenshot-637.png]
Description: This is a limited utility that demonstrates how an image can be mapped into a jigsaw puzzle.

Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-Jigsaw-Piece-Creator".

Install: Compile Jigsaw-Piece-Creator.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".



Attached Files
.7z   TheBOB-Jigsaw-Piece-Creator.7z (Size: 5.26 KB / Downloads: 80)
Print this item

  Rosetta Code Challenges
Posted by: bplus - 04-26-2022, 09:17 PM - Forum: bplus - Replies (15)

The posts in this thread are from Rosetta Code Challenges.

You are free to post improvements.

Better IMHO is less LOC (Lines Of Code) but try to hold off on using so many colons on a line: none is perfect, one or 2 reasonable, 10 ridiculous! = too much)
_____________________________________________________________________________________________

Ken was asking about this today.

Bulls and cows: http://rosettacode.org/wiki/Bulls_and_cows

Code: (Select All)
_Title "Bulls and Cows" ' found at Rosetta for Qbasic, copy 2019-01-31

'challenge is to develope AI player for this game

DefInt A-Z

Dim secret As String
Dim guess As String
Dim c As String
Dim bulls, cows, guesses, i

Randomize Timer
Do While Len(secret) < 4
    c = Chr$(Int(Rnd * 10) + 48)
    If InStr(secret, c) = 0 Then secret = secret + c
Loop

guesses = 0
Do
    Input "Guess a 4-digit number with no duplicate digits: "; guess
    guess = LTrim$(RTrim$(guess))
    If Len(guess) = 0 Then Exit Do

    If Len(guess) <> 4 Or Val(guess) = 0 Then
        Print "** You should enter 4 numeric digits!"
        GoTo looper
    End If

    bulls = 0: cows = 0: guesses = guesses + 1
    For i = 1 To 4
        c = Mid$(secret, i, 1)
        If Mid$(guess, i, 1) = c Then
            bulls = bulls + 1
        ElseIf InStr(guess, c) Then
            cows = cows + 1
        End If
    Next i
    Print bulls; " bulls, "; cows; " cows"

    If guess = secret Then
        Print "You won after "; guesses; " guesses!"
        Exit Do
    End If
    looper:
Loop



[Image: Bulls-and-cows.png]

Print this item

  Kong 2 - QB64 Classic Gorillas Game.
Posted by: Pete - 04-26-2022, 08:31 PM - Forum: TheBOB - No Replies

Kong2.bas by Bob Seguin.

[Image: Kong2.png]

Description: A wonderful graphics upgrade of the classic QBasic Gorillas game.

Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-Kong2".

Install: Compile Kong2.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".



Attached Files
.7z   TheBOB-Kong2.7z (Size: 657.37 KB / Downloads: 74)
Print this item

  Kong 2 - QB64 Classic Gorillas Game.
Posted by: Pete - 04-26-2022, 08:31 PM - Forum: Games - No Replies

Kong2.bas by Bob Seguin.

[Image: Kong2.png]

Description: A wonderful graphics upgrade of the classic QBasic Gorillas game.

Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-Kong2".

Install: Compile Kong2.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".



Attached Files
.7z   TheBOB-Kong2.7z (Size: 657.37 KB / Downloads: 87)
Print this item

  Leap Frog - One Player Game Based on a Popular Wooden Pegboard Puzzle.
Posted by: Pete - 04-26-2022, 08:11 PM - Forum: TheBOB - No Replies

LeapFrog.bas by Bob Seguin
[Image: Screenshot-636.png]
Description: Eliminate all the frogs on the lily pads until only one frog remains. Mouse driven application.

Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-LeapFrog".

Install: Compile LeapFrog.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".



Attached Files
.7z   TheBob-LeapFrog.7z (Size: 30.84 KB / Downloads: 88)
Print this item

  Leap Frog - One Player Game Based on a Popular Wooden Pegboard Puzzle.
Posted by: Pete - 04-26-2022, 08:11 PM - Forum: Games - No Replies

LeapFrog.bas by Bob Seguin
[Image: Screenshot-636.png]
Description: Eliminate all the frogs on the lily pads until only one frog remains. Mouse driven application.

Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-LeapFrog".

Install: Compile LeapFrog.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".



Attached Files
.7z   TheBob-LeapFrog.7z (Size: 30.84 KB / Downloads: 146)
Print this item

  Miniture Golf - A 9-Hole Arcade Style Miniture Golf Game [Work in Progress.]
Posted by: Pete - 04-26-2022, 07:34 PM - Forum: TheBOB - No Replies

MiniGolf.bas by Bob Seguin

This is a work in progress. All holes were converted to QB64 successfully except for hole #6.

I'll post more about this contribution next week. Stay tuned.

Pete

Print this item