Unscrambler
A C++ program that creates all possible options of a given word and checks if it is present in the file words.txt. In words.txt are currently 450k english words stored.
Installation
- Download the latest binary release for your platform:
Unscrambler.exefor Windows-64bit systemsUnscrambler-Linuxfor Linux-64bit systemsUnscrambler-Macfor Intel based Mac systems.- Download the
words.txtfile from latest release and put it into the same folder, as the binary from step 1. - Follow the next steps, only if you use windows!
- Press and hold the
windows-key, next to yourCtrl-key. - Press the letter
Ron your keyboard. - Release both keys.
- Empty the box, that popped up in the bottom left corner of your screen.
- If it is empty, type
regeditand then pressOK. - If asked a user control prompt, click
Yes. - In the Registry window, you should see a bar on the left ahnd side, like the one in your explorer. In there, navigate to the folder
Computer\HKEY_CURRENT_USER\Console. - On the right hand side of the window, you should now see many values, having in it
ColorTable00,ColorTable01, etc. - In the empty white space on the right/middle of this window, make a right click and select
New -> DOWRD (32-bit). - If prompted for the name, type
VirtualTerminalLeveland pressOK. - Then Double click the newly created value (should be highlighted blue).
- A new window should have popped up, asking you for the value.
- Set the value to
1and clickOK. - You can now close this window.
Executing the program
Windows
- Make sure you have the
words.txtfile in the same folder, asUnscrambler.exe. - Double click the
Unscrambler.exefile. - See usage for the usage of the program.
- If the program has outputted all the words, and said, that it exited, you can continue with Step 5.
- To close the program, either close the window or type any character and press enter.
MacOS/Linux
- Open a terminal.
- Change the directory with
cdto the directory, in which the Binary is located. (You can list all avaliable directories withls). - If you are in the directory with the binary and the words.txt file, type
./Unscrambler-Macto execute the program. - Continue with Usage.
Usage
- Execute the program.
- Type the letters you want to unscramble and then press enter.
- Type in the number of threads, you want to use and then press enter.
- Wait for the progress bar to fill and/or the program to say, that it has exited.
Building from source
⚠️⚠️ Only continue from here, if you know, what you are doing ⚠️⚠️
Linux
- Get the source files by either using git or getting the files, by downloading the zip Archive and extracting it.
git clone https://github.com/MaFeLP/Unscrambler.git cd Unscrambler/ - You can use the predefined makefile, but it would be better if you would make your own, using cmake.
You can create a makefile, by using the command:cmake CMakeLists.txt - Build the binary with the following command:
make
MacOS
- Install Xcode.
- Install cmake.
- Open a Terminal, by pressing
Command+Spacebaron your keyboard, typingterminaland hitting enter. - Get the source files with the following commands:
git clone https://github.com/MaFeLP/Unscrambler.git cd Unscrambler/ - Create a makefile and build the executable with the following commands:
/Applications/CMake.app/Contents/bin/cmake CMakeLists.txt make
Other open source projects used in this project
- meganz/mingw-std-threads - Used for multihreading in windows.
- ekg/cpp_progress_bar - Used to display the progress bar.
- dwyl/english-words - The dictionary which contains the english words.