Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Solution #29

wants to merge 2 commits into from

Conversation

serhii-web
Copy link

Comment on lines 27 to 28
createRandomNumber();
createRandomNumber();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe pass argument inside?

createRandomNumber(2) // generates two random numbers
createRandomNumber(4) // generates four random numbers
createRandomNumber() // generates one random number

@@ -1,3 +1,254 @@
'use strict';

// write your code here

const button = document.querySelector('button');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whicch exact button you're getting here? Maybe use class to select exact button?

}

function createRandomNumber() {
const number = [2, 4][+(Math.random() > 0.9)];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well done

}));
}

function cleareBoard() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function cleareBoard() {
function clearBoard() {

Comment on lines 97 to 111
if (tap.key === 'ArrowRight') {
moveRight();
}

if (tap.key === 'ArrowLeft') {
moveLeft();
}

if (tap.key === 'ArrowDown') {
moveDown();
}

if (tap.key === 'ArrowUp') {
moveUp();
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch case

}

function moveRight() {
moveInRingthDirection();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is Ringth?

@serhii-web serhii-web requested a review from vkryvytskyy April 10, 2021 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants