Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatyana-js committed Oct 11, 2023
1 parent c2b9423 commit 2cd7903
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
### Hexlet tests and linter status:
[![Actions Status](https://github.com/Tanya14081981/frontend-project-44/workflows/hexlet-check/badge.svg)](https://github.com/Tanya14081981/frontend-project-44/actions)[![Maintainability](https://api.codeclimate.com/v1/badges/fb74f85f99b4a3def279/maintainability)](https://codeclimate.com/github/Tanya14081981/frontend-project-44/maintainability)
https://asciinema.org/a/zvjF8kuKtS1kQq1tsTn6nrJ9X
Empty file modified bin/brain-even.js
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions src/cli.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import getName from './getName.js';
import readlineSync from 'readline-sync';

const greetGamer = (userName) => {
const greetGamer = () => {
console.log('Welcome to the Brain Games!');
getName();
const userName = readlineSync.question('May I have your name? ');
console.log(`Hello, ${userName}!`);
};

Expand Down
9 changes: 3 additions & 6 deletions src/game.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import readlineSync from 'readline-sync';

import greetGamer from './cli.js';

import getName from './getName.js';

const isEvenNum = (number) => number % 2 === 0;

const startGame = () => {
const userName = getName();
greetGamer(userName);
console.log('Welcome to the Brain Games!');
const userName = readlineSync.question('May I have your name? ');
console.log(`Hello, ${userName}!`);
console.log('Answer "yes" if the number is even, otherwise answer "no".');
for (let i = 0; i < 3; i += 1) {
const number = Math.floor(Math.random() * 100);
Expand Down
8 changes: 0 additions & 8 deletions src/getName.js

This file was deleted.

0 comments on commit 2cd7903

Please sign in to comment.