- Clone repository:
$ git clone https://github.com/NickUkraine24/guess_game.git
- Go to project directory:
$ cd guess_game
- Run command:
$ ruby guess_game.rb max_number
-
If you guess a random number:
- Input:
$ ruby guess_game.rb 10
- Output:
Input please number from 1 to 10:
- Input:
$ 1
- Output:
Number is less. Input please number from 1 to 10:
- Input:
$ 5
- Output:
Number is greater. Input please number from 1 to 10:
- Input:
$ 3
- Output:
You won!
- Input:
-
If you do not guess a random number:
-
Input:
$ ruby guess_game.rb 10
-
Output:
Input please number from 1 to 10:
-
Input:
$ 2
-
Output:
Number is less. Input please number from 1 to 10:
-
...
-
Input:
$ 6
-
Output:
Number is greater. Input please number from 1 to 10:
-
Input:
$ 5
-
Output:
Number is greater. Random number is 3.
-