- You need PHP version 7 or higher installed.
- Installed composer, so that it is available globally by the composer command(see)
git clone git@github.com:popovbm/php-project-lvl1.git
cd php-project-lvl1
make install
- The user is asked three questions in turn.
- If the user has entered the correct answer to the first question, the game continues and moves on to the second question. All three questions must be answered correctly.
- If the user gives an incorrect answer, the game ends.
Note: You must be in the directory /php-project-lvl1 and type:
make "game name" (e.g. make brain-even)
- brain-even
- brain-calc
- brain-gcd
- brain-progression
- brain-prime
The user is shown a random number(e.g. "42"). The user must enter "yes" if the number is even, or "no" if it is odd.
The user is shown a random mathematical expression(e.g. "12 + 33") that needs to be calculated and enter the correct answer.
The user is shown two random numbers(e.g. "25 50"). The user must calculate and enter the greatest common divisor of these numbers.
The user is shown a series of numbers forming an arithmetic progression with one missing value (e.g. "1 2 3 .. 5 6 7 8"). The user must enter a missing value.
The user is shown a random number(e.g. "15"). The user must enter "yes" if the number is prime, or "no" if it's not prime.