lev / php-project-lvl1
hexlet.io上的第一个PHP项目。五个命令行界面(CLI)小游戏
dev-master
2020-07-01 15:50 UTC
Requires
- wp-cli/php-cli-tools: ^0.11.11
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-29 05:48:45 UTC
README
第一个学习项目
包含五个控制台小游戏。游戏会提问。正确回答三个问题后,游戏结束。错误回答将结束游戏并提示重新开始。
游戏
- 计算器。支持算术表达式####。
- 数列。寻找数列中的缺失数字。
- 判断偶数。
- 求最大公约数。
- 判断素数。
游戏示例
$ brain-progression
Welcome to the Brain Game!
What number is missing in this progression?
May I have your name? Roman
Hello, Roman!
Question: 14 .. 18 20 22 24 26 28
Your answer: 16 # Пользователь вводит ответ
Correct!
Question: 5 6 7 8 9 .. 11 12
Your answer: 10 # Пользователь вводит ответ
Correct!
Question: 12 15 18 21 .. 27 30 33
Your answer: 24 # Пользователь вводит ответ
Correct!
Congratulations, Roman!
安装所有游戏
composer global require lev/php-project-lvl1:dev-master
运行游戏
brain-even
brain-calc
brain-gcd
brain-progression
brain-prime