Skip to content

Commit c25220f

Browse files
committed
project check
1 parent e0c6af2 commit c25220f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Engine.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function checkAnswer($count, $name, $path)
3434
//-- Игра - "Проверка на чётность"
3535
case "even":
3636
line('Answer "yes" if the number is even, otherwise answer "no".');
37-
$answer = prompt("Question:", $num);
37+
$answer = prompt("Question: {$num}");
3838
$isEven = $num % 2 === 0 ? true : false;
3939
$expectedAnswer = $isEven ? 'yes' : 'no';
4040
break;
@@ -57,27 +57,27 @@ function checkAnswer($count, $name, $path)
5757
$expectedAnswer = $num - $num2;
5858
break;
5959
}
60-
$answer = prompt("Question:", "{$num} {$thisOperation} {$num2}");
60+
$answer = prompt("Question: {$num} {$thisOperation} {$num2}");
6161
$answer = is_string($answer) ? $answer : (int)$answer;
6262
break;
6363
//-- Игра - Общий делитель -- "НОД"
6464
case "gcd":
6565
$expectedAnswer = getGcd($num, $num2);
6666
line('Find the greatest common divisor of given numbers.');
67-
$answer = prompt("Question:", "{$num} {$num2}");
67+
$answer = prompt("Question: {$num} {$num2}");
6868
break;
6969
//-- Игра - "Арифметическая прогрессия"
7070
case "progression":
7171
$progression = generateProgression();
7272
$hiddenElement = hideElement($progression);
7373
$expectedAnswer = $hiddenElement["hidden_value"];
7474
line('What number is missing in the progression?');
75-
$answer = prompt("Question:", implode(" ", $hiddenElement["progression"]));
75+
$answer = prompt("Question: " . implode(" ", $hiddenElement["progression"]));
7676
break;
7777
//-- Игра - "Простое ли число?"
7878
case "prime":
7979
line('Answer "yes" if the number is prime. Otherwise answer "no".');
80-
$answer = prompt("Question:", $num);
80+
$answer = prompt("Question: {$num}");
8181
$expectedAnswer = isPrime($num) ? 'yes' : 'no';
8282
break;
8383
default:

0 commit comments

Comments
 (0)