Skip to content

RainDrops: start project - #7

Open
krilian88 wants to merge 1 commit into
mainfrom
RainDrops
Open

RainDrops: start project#7
krilian88 wants to merge 1 commit into
mainfrom
RainDrops

Conversation

@krilian88

Copy link
Copy Markdown
Owner

No description provided.

@krilian88
krilian88 requested a review from broshkabro February 22, 2021 08:52
@broshkabro broshkabro changed the title init: start project RainDrops: start project Feb 25, 2021
@broshkabro

Copy link
Copy Markdown
Collaborator

It would be nice to structure the project (js and css folders for corresponding files).

@broshkabro

Copy link
Copy Markdown
Collaborator

The layout of drops is broken for double-digit values
image

@broshkabro

broshkabro commented Feb 25, 2021

Copy link
Copy Markdown
Collaborator

Basic scope: 70

Mark-up and design: 30

  • min-width 320px
  • the design corresponds to the mock-up
  • bgr sound and animation of the ways

Basic game logic: 40

  • math operators are generated randomly
  • there is a control panel with numbers that helps to enter an answer
  • an app can differ wrong and correct answers
  • there is a separate page with the score at the end of the game

Advanced scope: 70

  • a click on 'How to play' button runs an auto-play game mode
  • the complexity of a game grows
  • the speed of the drops grows
  • sound and animation for wrong/correct answers
  • score calculation: 10 - for the 1st drop, previous score + 1 - for others
  • bonus drops
  • keys and enter buttons are supported
  • score and statics page

Hacker scope: 10

  • full-screen mode
  • a user can choose math operations and the number of digits
  • extra functionality

@broshkabro broshkabro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Awesome job!

Comment thread wave.js
Comment on lines +14 to +38
function draw() {
cnv.width = cnv.width;

for(let j = waves.length - 1; j >= 0; j--) {
let offset = i + j * Math.PI * 12;
ctx.fillStyle = (waves[j]);
let randomLeft = (Math.sin(offset/100) + 1) / 2 * 200;
let randomRight = (Math.sin((offset/100) + 10) + 1) / 2 * 200;
let randomLeftConstraint = (Math.sin((offset/60) + 2) + 1) / 2 * 200;
let randomRightConstraint = (Math.sin((offset/60) + 1) + 1) / 2 * 200;

ctx.beginPath();
ctx.moveTo(0, randomLeft + 100);

ctx.bezierCurveTo(w / 3, randomLeftConstraint, w / 3 * 2, randomRightConstraint, w, randomRight + 100);
ctx.lineTo(w , h);
ctx.lineTo(0, h);
ctx.lineTo(0, randomLeft + 100);

ctx.closePath();
ctx.fill();
}

i = i + 3;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please add code indentation inside this function and for-loop to improve the readability.

Comment thread style.css
flex-direction: column;
justify-content: center;


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove unnecessary empty lines

Comment thread main.js
// {
// sign: "/",
// operation: function(a,b){ return a / b; }
// }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if you are not going to use this code, then it is better to remove it.

Comment thread main.js

const removeElement = (element) => {
element.remove();
};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can be shortened

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.

2 participants