Guess The Correct Number & Win !
number_game.sh is a simple guessing game written in Bash. The objective is to correctly guess a randomly generated number between 1 and 100 in as few attempts as possible. The game provides feedback whether the guess is too high, too low, or correct.
- iSH app installed on your iOS device or a terminal on your computer.
- Basic knowledge of how to use the command line.
~ In the iSH App ~
- Launch the iSH app: Open the iSH app on your iOS device.
- Navigate to the game directory: Use the cd command to navigate to the directory where you have saved the game script. For example:
cd /path/to/your/game
- Run the game script: Execute the game script by typing the following command:
./number_game.sh
- Make sure the script has executable permissions. If not, you can add executable permissions with:
chmod +x number_game.sh
- Start guessing: The game will prompt you to guess a number between 1 and 100. Enter your guess and press Enter/Return
Guess a number between 1 & 100
-
Receive feedback: After each guess, the game will give you feedback indicating whether your guess was too high, too low, or correct.
-
Continue playing: The game will continue to prompt you for guesses until you find the correct number. Try to guess the number in as few attempts as possible.
~ In the Terminal ~
- Open your terminal: Launch the terminal application on your computer.
- Navigate to the game directory: Use the cd command to navigate to the directory where you have saved the game script. For example:
cd /path/to/your/game
- Run the game script: Execute the game script by typing the following command:
./number_game.sh
- Ensure the script has executable permissions. If not, you can add executable permissions with:
chmod +x number_game.sh
- Start guessing: The game will prompt you to guess a number between 1 & 100. Enter your guess and press Enter/ Return.
Guess a number between 1 and 100
-
Receive feedback: After each guess, the game will give you feedback indicating whether your guess was too high, too low, or correct.
-
Continue playing: The game will continue to prompt you for guesses until you find the correct number. Try to guess the number in as few attempts as possible.