|
4 | 4 | [](https://github.com/Mercer241/java-project-61/actions) |
5 | 5 |
|
6 | 6 | [](https://codeclimate.com/github/Mercer241/java-project-61/maintainability) |
7 | | -[](https://codeclimate.com/github/Mercer241/java-project-61/test_coverage) |
8 | | - |
9 | | -## SonarCloud Status |
10 | | -[](https://sonarcloud.io/summary/new_code?id=Mercer241_java-project-61) |
11 | | -[](https://sonarcloud.io/summary/new_code?id=Mercer241_java-project-61) |
12 | | -[](https://sonarcloud.io/summary/new_code?id=Mercer241_java-project-61) |
13 | | -[](https://sonarcloud.io/summary/new_code?id=Mercer241_java-project-61) |
14 | | - |
15 | | -## Описание |
16 | | -Проект "Игры разума" — набор из 6 консольных игр для тренировки логики. |
17 | | - |
18 | | -## Установка и запуск |
19 | | -```bash |
20 | | -git clone https://github.com/Mercer241/java-project-61.git |
21 | | -cd java-project-61/app |
22 | | -./gradlew run |
23 | | -``` |
24 | | - |
25 | | -## Игры |
26 | | -1. **Even** — проверка на чётность |
27 | | -2. **Calc** — арифметические операции |
28 | | -3. **GCD** — наибольший общий делитель |
29 | | -4. **Progression** — арифметическая прогрессия |
30 | | -5. **Prime** — проверка на простое число |
31 | | - |
32 | | -## Примеры запуска игр |
33 | | - |
34 | | -### Меню выбора игр |
35 | | -``` |
36 | | -$ ./gradlew run |
37 | | -Please enter the game number and press Enter. |
38 | | -1 - Greet |
39 | | -2 - Even |
40 | | -3 - Calc |
41 | | -4 - GCD |
42 | | -5 - Progression |
43 | | -6 - Prime |
44 | | -0 - Exit |
45 | | -Your choice: |
46 | | -``` |
47 | | - |
48 | | -### Игра "Even" (Проверка на чётность) |
49 | | -``` |
50 | | -Your choice: 2 |
51 | | -May I have your name? Alex |
52 | | -Hello, Alex! |
53 | | -Answer 'yes' if the number is even, otherwise answer 'no'. |
54 | | -Question: 15 |
55 | | -Your answer: no |
56 | | -Correct! |
57 | | -Question: 6 |
58 | | -Your answer: yes |
59 | | -Correct! |
60 | | -Question: 7 |
61 | | -Your answer: no |
62 | | -Correct! |
63 | | -Congratulations, Alex! |
64 | | -``` |
65 | | - |
66 | | -### Игра "Calc" (Калькулятор) |
67 | | -``` |
68 | | -Your choice: 3 |
69 | | -May I have your name? Alex |
70 | | -Hello, Alex! |
71 | | -What is the result of the expression? |
72 | | -Question: 12 * 9 |
73 | | -Your answer: 108 |
74 | | -Correct! |
75 | | -Question: 17 + 10 |
76 | | -Your answer: 27 |
77 | | -Correct! |
78 | | -Question: 9 - 11 |
79 | | -Your answer: -2 |
80 | | -Correct! |
81 | | -Congratulations, Alex! |
82 | | -``` |
83 | | - |
84 | | -### Игра "GCD" (Наибольший общий делитель) |
85 | | -``` |
86 | | -Your choice: 4 |
87 | | -May I have your name? Alex |
88 | | -Hello, Alex! |
89 | | -Find the greatest common divisor of given numbers. |
90 | | -Question: 25 50 |
91 | | -Your answer: 25 |
92 | | -Correct! |
93 | | -Question: 100 52 |
94 | | -Your answer: 4 |
95 | | -Correct! |
96 | | -Question: 3 9 |
97 | | -Your answer: 3 |
98 | | -Correct! |
99 | | -Congratulations, Alex! |
100 | | -``` |
101 | | - |
102 | | -### Игра "Progression" (Арифметическая прогрессия) |
103 | | -``` |
104 | | -Your choice: 5 |
105 | | -May I have your name? Alex |
106 | | -Hello, Alex! |
107 | | -What number is missing in the progression? |
108 | | -Question: 5 7 9 11 13 .. 17 19 21 23 |
109 | | -Your answer: 15 |
110 | | -Correct! |
111 | | -Question: 2 5 8 .. 14 17 20 23 26 29 |
112 | | -Your answer: 11 |
113 | | -Correct! |
114 | | -Question: 14 19 24 29 34 39 44 49 54 .. |
115 | | -Your answer: 59 |
116 | | -Correct! |
117 | | -Congratulations, Alex! |
118 | | -``` |
119 | | - |
120 | | -### Игра "Prime" (Простое ли число?) |
121 | | -``` |
122 | | -Your choice: 6 |
123 | | -May I have your name? Alex |
124 | | -Hello, Alex! |
125 | | -Answer 'yes' if given number is prime. Otherwise answer 'no'. |
126 | | -Question: 7 |
127 | | -Your answer: yes |
128 | | -Correct! |
129 | | -Question: 10 |
130 | | -Your answer: no |
131 | | -Correct! |
132 | | -Question: 13 |
133 | | -Your answer: yes |
134 | | -Correct! |
135 | | -Congratulations, Alex! |
136 | | -``` |
137 | | - |
138 | | -## Примеры ошибок |
139 | | - |
140 | | -### Ошибка в игре "Even" |
141 | | -``` |
142 | | -Question: 15 |
143 | | -Your answer: yes |
144 | | -'yes' is wrong answer ;(. Correct answer was 'no'. |
145 | | -Let's try again, Alex! |
146 | | -``` |
147 | | - |
148 | | -### Ошибка в игре "Calc" |
149 | | -``` |
150 | | -Question: 25 * 7 |
151 | | -Your answer: 145 |
152 | | -'145' is wrong answer ;(. Correct answer was '175'. |
153 | | -Let's try again, Alex! |
154 | | -``` |
155 | | - |
156 | | -### Ошибка в игре "GCD" |
157 | | -``` |
158 | | -Question: 25 50 |
159 | | -Your answer: 1 |
160 | | -'1' is wrong answer ;(. Correct answer was '25'. |
161 | | -Let's try again, Alex! |
162 | | -``` |
163 | | - |
164 | | -### Ошибка в игре "Progression" |
165 | | -``` |
166 | | -Question: 5 7 9 11 13 .. 17 19 21 23 |
167 | | -Your answer: 12 |
168 | | -'12' is wrong answer ;(. Correct answer was '15'. |
169 | | -Let's try again, Alex! |
170 | | -``` |
171 | | - |
172 | | -### Ошибка в игре "Prime" |
173 | | -``` |
174 | | -Question: 7 |
175 | | -Your answer: no |
176 | | -'no' is wrong answer ;(. Correct answer was 'yes'. |
177 | | -Let's try again, Alex! |
178 | | -``` |
179 | | - |
180 | | -## Технологии |
181 | | -- Java 17+ |
182 | | -- Gradle |
183 | | -- Checkstyle |
184 | | -- GitHub Actions |
185 | | -- SonarCloud |
186 | | - |
187 | | -## Автор |
188 | | -Александр Приходько |
0 commit comments