Open
Conversation
MSt1ch
reviewed
Mar 11, 2021
| let min = 1; | ||
| let max = 98; | ||
| let x = Math.floor((Math.random() * (max - min + 1) + min) / 2) * 2; | ||
| let y = Math.floor((Math.random() * (max - min + 1) + min) / 2) * 2; |
Collaborator
There was a problem hiding this comment.
suggest you use permanent variables like const if you never changed them.
| } | ||
|
|
||
| render() { | ||
| console.log(this.state.status); |
| import React, { useState, useEffect } from 'react'; | ||
|
|
||
| const useAudio = (url) => { | ||
| const [audio] = useState(new Audio(url)); |
Collaborator
There was a problem hiding this comment.
Let's check the documentation about theuseState hook.
| color: #ff0000; | ||
| justify-content: space-around; | ||
| } | ||
| .startgame { |
Collaborator
There was a problem hiding this comment.
I suggest you use the same notation dash or camel case
| margin-left: 30px; | ||
| width: 150px; | ||
| } | ||
| #GameOverText { |
Collaborator
There was a problem hiding this comment.
I suggest you avoiding ID in CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task: https://github.com/rolling-scopes-school/tasks/blob/master/tasks/react/react-game.md

Screenshot:
Deploy: https://ainuanna.github.io/react-game-snake/
Deadline: 03.03.2021 Done: 03.03.2021
Score: 60/100
Basic scope +30
эффекты анимации. Анимация ходов, перемещения фигур, допустимых и недопустимых ходов, начала и окончания игры, победы и поражения и т.д +10
Advanced scope +30