Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Egorskov committed Oct 20, 2024
1 parent b01c08a commit 66211d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function communication(array $answers, string $game): void
line("$game");
foreach ($answers as $key => $value) {
$answer = prompt("Question: $key\nYou answer");
if ($answer !== $value) {
if ($answer != $value) {
line("'$answer' is wrong answer ;( Correct answer: '$value') \nLet's try again, $name!");
return;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/Games/Calc.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function runCalc(): void
$game = 'What is the result of the expression?';
$answers = [];
$signs = ['+', '-', '*'];
for ($i = 0; $i < ROUND; $i++) {
for ($i = 1; $i <= ROUND; $i++) {
$first = mt_rand(MIN_NUM, MAX_NUM);
$second = mt_rand(MIN_NUM, MAX_NUM);
$operator = $signs[array_rand($signs)];
Expand Down

0 comments on commit 66211d9

Please sign in to comment.