Skip to content

Commit

Permalink
fix brain-progression
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavRusanov committed Nov 14, 2023
1 parent 805a931 commit 9acdf76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/games/brain-progression.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import getRandomNumber from '../randomNumber.js';
const countsOfNumber = 10;

const getProgression = () => {
const progressions = [getRandomNumber(10)];
const progressions = [getRandomNumber(10, 1)];
const progressionStep = getRandomNumber(10, 1);

for (let i = 0; i < countsOfNumber; i += 1) {
Expand All @@ -17,7 +17,7 @@ const getProgression = () => {
const playProgressionRound = () => {
const progressions = getProgression();
const randomAsk = getRandomNumber(10);
const correctAnswer = progressions[randomAsk - 1];
const correctAnswer = progressions[randomAsk];
const newProgressions = [];

for (let i = 0; i < countsOfNumber; i += 1) {
Expand Down

0 comments on commit 9acdf76

Please sign in to comment.