Skip to content

Commit

Permalink
refactor: use lodash random
Browse files Browse the repository at this point in the history
  • Loading branch information
sazanik committed Nov 15, 2024
1 parent 5914b44 commit 10f3885
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
25 changes: 16 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"license": "ISC",
"dependencies": {
"@eslint/eslintrc": "^3.1.0",
"lodash-es": "^4.17.21",
"readline-sync": "^1.4.10"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion src/games/evenGame.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { random } from 'lodash-es';

import { BOOLEAN_TO_ANSWER_MAP } from '../constants/index.js';
import { askQuestion, getAnswer, getResponseAfterRound } from '../cli.js';
import { isEven } from '../utils/index.js';

export default () => {
const num = Math.round(Math.random() * 1000);
const num = random(10, 1000);

askQuestion(num);

Expand Down

0 comments on commit 10f3885

Please sign in to comment.