Search found 70 matches
- Jan 28, 2024 20:34
- Forum: Sources, Examples, Tips and Tricks
- Topic: Unique Sudoku Solver
- Replies: 0
- Views: 330
Unique Sudoku Solver
Not sure if this is ready for posting, but here it is. This is the start of a unique solver where it doesn't use brute force or recursion to solve the puzzles. Instead, it uses different solving techniques like Hidden Singles, Hidden Pairs, etc. to try and solve the puzzles. Currently only Hidden Si...
- Dec 18, 2023 15:35
- Forum: General
- Topic: Sprites and LTPB
- Replies: 1
- Views: 469
Sprites and LTPB
Back in 1998 Interplay/Presage/Stepping Stone came out with e programming language based on BASIC called "Learn to Program BASIC" and I have always enjoyed using it. Especially the sprite features. I thought I would try and recreate LTPB commands and functions for FreeBasic. I also created...
- Dec 10, 2023 20:42
- Forum: Sources, Examples, Tips and Tricks
- Topic: OpenB3D: Creating a 3d level from multiple tilemaps
- Replies: 2
- Views: 528
Re: OpenB3D: Creating a 3d level from multiple tilemaps
Where do ya get Openb3d.bi? Getting Minib3d doesn’t work.
- Dec 09, 2023 7:39
- Forum: Sources, Examples, Tips and Tricks
- Topic: Mouse Routine
- Replies: 0
- Views: 839
Mouse Routine
Here is some code I put together based on an old Programming Language. It is currently just basic (no pun intended). A Demo is included here to show off the results. Rat.bi: Type NewMouse As Integer Grab, xRat, yRat, ButtonRat As String*1 ButtonStr Declare Function Button as Boolean Declare Function...
- Nov 15, 2023 3:10
- Forum: Projects
- Topic: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)
- Replies: 981
- Views: 346673
Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)
There is a bug in WinFBE that has been present in FB Edit as well. Take this Example: For t as Integer=1 to 10: Print "Howdy": Next Normally it is split up into multiple lines, but here it is all one line. Press Enter before the first colon and you get this: For t as Integer=1 to 10 Next ...
- Nov 14, 2023 22:57
- Forum: Projects
- Topic: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)
- Replies: 981
- Views: 346673
Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)
There is a bug in WinFBE that has been present in FB Edit as well. Take this Example: For t as Integer=1 to 10: Print "Howdy": Next Normally it is split up into multiple lines, but here it is all one line. Press Enter before the first colon and you get this: For t as Integer=1 to 10 Next :...
- Oct 09, 2023 17:29
- Forum: General
- Topic: double trouble
- Replies: 42
- Views: 4957
Re: round to two digits?
I know this may be completely silly thing to do, but ya could create a function that take in a value , converts it to a string, get the position of the decimal point and then return the value two places after the decimal point. Just my penny worth of silliness.
- Oct 08, 2023 21:55
- Forum: General
- Topic: 16 Segment Sudoku Solver
- Replies: 0
- Views: 1327
16 Segment Sudoku Solver
Here is some code I have been playin with that solves sudoku puzzles. The code to solve puzzles can be found on Roseta Code: https://www.rosettacode.org/wiki/Sudoku#FreeBASIC https://www.rosettacode.org/wiki/Sudoku#VBA The FreeBasic version isn't in English so I used the VBA version to compensate. T...
- Oct 08, 2023 21:06
- Forum: General
- Topic: Code Recursion
- Replies: 4
- Views: 1608
Re: Code Recursion
hello NorbyDroid :) if dodicat were here I am sure he would be able to help the best that I can attempt is to convert someone else's code, I tried to convert this but something went wrong https://codereview.stackexchange.com/questions/278622/sudoku-solver-in-c-without-recursion if you want the non-...
- Oct 08, 2023 7:22
- Forum: General
- Topic: Code Recursion
- Replies: 4
- Views: 1608
Code Recursion
I was looking at the code for the Sudoku Solver on Rosetta Code and noticed it uses recursion (Same subroutine multiple times in a loop). Is there a way to do it without the recursion? Here is the Code: Dim Shared As Integer cuadricula(9, 9), cuadriculaResuelta(9, 9) Function isSafe(i As Integer, j ...
- Sep 23, 2023 10:25
- Forum: General
- Topic: Rotate bits in a byte
- Replies: 6
- Views: 2439
Re: Rotate bits in a byte
Not sure if this is helpful, but I posted some code that rotates here: viewtopic.php?p=299755&hilit=rotate#p299755
- Sep 22, 2023 11:40
- Forum: General
- Topic: 16 Segmented Display
- Replies: 1
- Views: 1213
Re: 16 Segmented Display
Here is a quick update. Thanks to Paul Doe for his reminder, I updated to 32 Bit colours instead of the 16. I added extra characters to the display and even added an animation for the Text. A few other tweaks as well. Enjoy #include "fbgfx.bi" Sub Segments(ix as Integer, iy as Integer, iSe...
- Sep 22, 2023 3:06
- Forum: General
- Topic: 16 Segmented Display
- Replies: 1
- Views: 1213
16 Segmented Display
Here is my attempt a a 16 segmented display. If ya want to see all characters available use Testing. Warning: My graphics skills aren't all that so be warned. Sub Segments(ix as Integer, iy as Integer, iSeg as String, ic as Integer) Select Case iSeg Case "0": Line(ix+2, iy+1)-(ix+12, iy+1)...
- Aug 04, 2023 2:32
- Forum: General
- Topic: Chaocipher
- Replies: 1
- Views: 300
Re: Chaocipher
I was able to figure it out and get it working so here it is a version that Encodes and Decodes successfully. ' Caocipher Example ' Rosetta Code ' This code was made in Power Basic 3.5 for DOS CLS ' Left Alphabet Function AlphaLeft(ct as String, pt as String, CharPos as Integer) as String Dim tStr a...
- Aug 03, 2023 18:33
- Forum: General
- Topic: Chaocipher
- Replies: 1
- Views: 300
Chaocipher
One thing I love to tinker with is codes and Ciphers and I found a new one on Rosetta COde not yet done in any BASIC languages so I thought I would correct that. Here is a link to the Rosetta Code Page: https://rosettacode.org/wiki/Chaocipher Although I was able to successfully get the program to En...