Skip to content

Commit 1b48aa8

Browse files
committed
third fail fix
1 parent 66767f2 commit 1b48aa8

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/games/brain-calc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const gameQuestions = (name) => {
2828
isCorrect = getUserAnswer(problem, solution, name);
2929
tries += 1;
3030
}
31-
if (tries === 3) {
31+
if (tries === 3 && isCorrect) {
3232
console.log(`Congratulations, ${name}!`);
3333
}
3434
};

src/games/brain-even.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const gameQuestions = (name) => {
1111
isCorrect = getUserAnswer(problem, solution, name);
1212
tries += 1;
1313
}
14-
if (tries === 3) {
14+
if (tries === 3 && isCorrect) {
1515
console.log(`Congratulations, ${name}!`);
1616
}
1717
};

src/games/brain-gcd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const gameQuestions = (name) => {
2323
isCorrect = getUserAnswer(problem, solution, name);
2424
tries += 1;
2525
}
26-
if (tries === 3) {
26+
if (tries === 3 && isCorrect) {
2727
console.log(`Congratulations, ${name}!`);
2828
}
2929
};

src/games/brain-prime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const gameQuestions = (name) => {
1919
isCorrect = getUserAnswer(problem, solution, name);
2020
tries += 1;
2121
}
22-
if (tries === 3) {
22+
if (tries === 3 && isCorrect) {
2323
console.log(`Congratulations, ${name}!`);
2424
}
2525
};

src/games/brain-progression.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const gameQuestions = (name) => {
2626
isCorrect = getUserAnswer(problem, solution, name);
2727
tries += 1;
2828
}
29-
if (tries === 3) {
29+
if (tries === 3 && isCorrect) {
3030
console.log(`Congratulations, ${name}!`);
3131
}
3232
};

0 commit comments

Comments
 (0)