Guess The Number
This is a program that I wrote that will have you think of a number, and it will ask six or seven questions to determine what your number is. There are two versions: one written in Java and the other written in C#.
· The executables for Windows can be found below:
o x64 (most systems)
o ARM (Ex. Qualcomm Snapdragon based systems)
· The zip file containing the source code (and binaries) can be found here.
Java (Windows, Linux, & macOS)
If you want to run the Java version, make sure you have Java 8 or later installed. It can be downloaded from Oracle or The Eclipse Foundation.
You can check your java version with the following command via the command-line (Terminal in Linux/macOS or PowerShell/Command Prompt/Windows Terminal in Windows):
java
-version
.NET/C# (Windows only)
To run the .NET (C#) version, you will need the .NET 8 Desktop Runtime (Windows).
To see if the .NET runtime is installed, use the command:
which.exe dotnet
(Windows).
To check the .NET version, use the following command:
dotnet
–list-runtimes
The .NET runtime is available from Microsoft.
· Open Command Prompt/PowerShell/Windows Terminal (Windows) or the Terminal (Linux & macOS) and navigate to the src > java directory
o Examples (modify based on where you extracted the zip file, if necessary)
§ Linux & macOS: cd ~/Downloads/GuessTheNumber/bin/java
§ Windows: cd ~\Downloads\GuessTheNUmber\bin\java
· Run the following command:
o
java
-jar GuessTheNumber.jar
· This version has been updated and provides a GUI instead of using the command line. It will also guess numbers up to 127 instead of 63.
· Within the bin > dotnet folder, there are two versions of the executable:
o win-x64- For traditional (x86-based) systems with an AMD or Intel CPU
o win-arm64- Optimized for ARM-based systems (Ex: Qualcomm Snapdragon X series chips)
§ The standard win64 version will still work on ARM, but will use more RAM than the ARM native version.