lev/php-project-lvl1

hexlet.io上的第一个PHP项目。五个命令行界面(CLI)小游戏

dev-master 2020-07-01 15:50 UTC

This package is auto-updated.

Last update: 2024-09-29 05:48:45 UTC


README

Build Status Code Climate Issue Count

第一个学习项目

包含五个控制台小游戏。游戏会提问。正确回答三个问题后,游戏结束。错误回答将结束游戏并提示重新开始。

游戏

  • 计算器。支持算术表达式####。
  • 数列。寻找数列中的缺失数字。
  • 判断偶数。
  • 求最大公约数。
  • 判断素数。

游戏示例

$ 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!

安装所有游戏

  1. composer global require lev/php-project-lvl1:dev-master

asciicast

运行游戏

  1. brain-even

asciicast

  1. brain-calc

asciicast

  1. brain-gcd

asciicast

  1. brain-progression

asciicast

  1. brain-prime

asciicast