|
| 1 | +<!-- Hexlet logo --> |
| 2 | +<a id="anchor-top"></a> |
| 3 | +<div align="center" |
| 4 | + style="display: flex; flex-wrap: wrap; flex: 1; flex-direction: column;"> |
| 5 | + <a href="https://ru.hexlet.io/" style="color: black"> |
| 6 | + <img src="images/hexlet_logo_full.svg" |
| 7 | + alt="Logo" |
| 8 | + width="170" height="60" |
| 9 | + style="display: flex; flex-wrap: wrap; margin: 6px"> |
| 10 | + </a> |
| 11 | + <h4 style="display: flex; flex-wrap: wrap; flex: 1; justify-content: center; margin: 0">hands-on programming courses</h4> |
| 12 | +</div> |
| 13 | + |
1 | 14 | ### Hexlet tests and linter status: |
2 | 15 | [](https://github.com/bazarovstas/python-project-49/actions) |
3 | 16 | [](https://codeclimate.com/github/bazarovstas/python-project-49/maintainability) |
4 | 17 |
|
| 18 | + |
| 19 | +<!-- Main page --> |
| 20 | +[![Hexlet-Project][project-image]](https://ru.hexlet.io/) |
| 21 | + |
| 22 | +<center> |
| 23 | + |
| 24 | + |
| 25 | +## The Brain Games |
| 26 | +Brain Games is a set of 5 logic puzzles that let you test how smart you are: |
| 27 | + |
| 28 | +|Game|Question|Example| |
| 29 | +|---|---|--:| |
| 30 | +| The Even Game | Answer "yes" if the number is even, otherwise answer "no" | 44 | |
| 31 | +| The Calc Game | What is the result of the expression? | 7 + 11 | |
| 32 | +| The GCD Game | Find the greatest common divisor of given numbers | 10 90 | |
| 33 | +| The Progressive Game | What number is missing in the progression? | 3 7 .. 15 | |
| 34 | +| The Prime Game | Answer "yes" if given number is prime. Otherwise answer "no" | 21 | |
| 35 | + |
5 | 36 | ## The Even Game |
6 | 37 | This demo of the even game shows the game process: |
7 | 38 | [](https://asciinema.org/a/687407) |
8 | 39 |
|
9 | | -## The Calc Game |
| 40 | +## The Calc Game |
10 | 41 | This demo of the calc game shows the game process: |
11 | 42 | [](https://asciinema.org/a/687410) |
12 | 43 |
|
13 | | -## The GCD Game |
| 44 | +## The GCD Game |
14 | 45 | This demo of the gcd game shows the game process: |
15 | 46 | [](https://asciinema.org/a/687411) |
16 | 47 |
|
17 | | -## The Progressive Game |
| 48 | +## The Progressive Game |
18 | 49 | This demo of the progressive game shows the game process: |
19 | 50 | [](https://asciinema.org/a/687412) |
20 | 51 |
|
21 | | -## The Prime Game |
| 52 | +## The Prime Game |
22 | 53 | This demo of the prime game shows the game process: |
23 | 54 | [](https://asciinema.org/a/687413) |
| 55 | + |
| 56 | +</center> |
| 57 | + |
| 58 | +<p align="center">[<a href="#anchor-top" style="color: black">BACK TO TOP</a>]</p> |
| 59 | + |
| 60 | + |
| 61 | +## Installation |
| 62 | +The installation is simple and does not take much time |
| 63 | + |
| 64 | +**1. Installing pipx** |
| 65 | + |
| 66 | +If you don't have a python 3.8+ than is required to install pipx: |
| 67 | + * Ubuntu: |
| 68 | + ``` |
| 69 | + sudo apt install pipx |
| 70 | + ``` |
| 71 | + * Using pip: |
| 72 | + ``` |
| 73 | + python3 -m pip install --user pipx |
| 74 | + ``` |
| 75 | + * Or on Windows via Scoop: |
| 76 | + ``` |
| 77 | + scoop install pipx |
| 78 | + ``` |
| 79 | + |
| 80 | +**2. Install Poetry** |
| 81 | + |
| 82 | +If pipx is already installed, you can install poetry: |
| 83 | + ``` |
| 84 | + pipx install poetry |
| 85 | + ``` |
| 86 | + add pyproject.toml to project folder: |
| 87 | + ``` |
| 88 | + poetry new project_name |
| 89 | + ``` |
| 90 | + or in pre-populated directory: |
| 91 | + ``` |
| 92 | + poetry init |
| 93 | + ``` |
| 94 | + and the last thing in this step, install virtual environment: |
| 95 | + ``` |
| 96 | + poetry install |
| 97 | + ``` |
| 98 | + |
| 99 | +**3. Repository** |
| 100 | + |
| 101 | +Visit GitHub at the following link: https://github.com/bazarovstas/python-project-49 |
| 102 | +and finnaly, enter the following command in the CLI: |
| 103 | + ``` |
| 104 | + poetry add git+ssh://[email protected]:bazarovstas/python-project-49.git |
| 105 | + ``` |
| 106 | + |
| 107 | + |
| 108 | +## Usage |
| 109 | +you can use scripts from the Makefile by installing the package, or use poetry scripts without installing anything: |
| 110 | + * Poetry: |
| 111 | + ``` |
| 112 | + poetry run brain-even |
| 113 | + poetry run brain-calc |
| 114 | + poetry run brain-gcd |
| 115 | + poetry run brain-progression |
| 116 | + poetry run brain-prime |
| 117 | + ``` |
| 118 | + * Scripts: |
| 119 | +generate a distributive and install them: |
| 120 | + ``` |
| 121 | + build |
| 122 | + package-install |
| 123 | + ``` |
| 124 | + use one of the following commands to run a specific game: |
| 125 | + ``` |
| 126 | + brain-even |
| 127 | + brain-calc |
| 128 | + brain-gcd |
| 129 | + brain-progression |
| 130 | + brain-prime |
| 131 | + ``` |
| 132 | + |
| 133 | + |
| 134 | +## Reinstall |
| 135 | + to reinstall the package, use the following command: |
| 136 | + ``` |
| 137 | + package-reinstall |
| 138 | + ``` |
| 139 | + |
| 140 | +<p align="center">[<a href="#anchor-top" style="color: black">BACK TO TOP</a>]</p> |
| 141 | + |
| 142 | +<div class="logo_wrapper" |
| 143 | + style="display: flex; align-items: center; justify-content: center;"> |
| 144 | + <img src="images/hexlet_logo.png" |
| 145 | + alt="Hexlet brand logo" |
| 146 | + width="110" heigth="110" |
| 147 | + style="display: flex; align-items: center; justify-content: center;"> |
| 148 | +</div> |
| 149 | + |
| 150 | + |
| 151 | +<!-- Markdown images --> |
| 152 | +[project-image]: images/project_image.png |
0 commit comments