Closed HardikPanwar closed 9 months ago
Name | Link |
---|---|
Latest commit | a97f64fbb83cdceb6518a6fc4c01a664cdad3b2a |
Latest deploy log | https://app.netlify.com/sites/frontend-database/deploys/6521900a657c830007dbcc90 |
Deploy Preview | https://deploy-preview-25--frontend-database.netlify.app/projects/color_simon_game |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Hey there! I've generated a report for the pull request. Let's dive in!
ProjectList.json
file to include the details of the Simon Game project.game.js
file for the Simon Game project.index.html
file for the Simon Game project.sounds
folder for the Simon Game project.styles.css
file for the Simon Game project.game.js
file, consider using more descriptive variable names instead of buttonColours
, gamePattern
, userClickedPattern
, started
, level
, etc. This will improve code readability.game.js
file, consider extracting the code for generating the random color and adding it to the nextSequence
function. This will make the code more modular and easier to understand. Here's a code snippet:function getRandomColor() {
var randomNumber = Math.floor(Math.random() * buttonColours.length);
return buttonColours[randomNumber];
}
function nextSequence() {
// ...
var randomChosenColour = getRandomColor();
// ...
}
game.js
file, consider using a CSS class instead of directly manipulating the style properties in the animatePress
function. This will separate the concerns of styling and behavior. Here's a code snippet:function animatePress(currentColour) {
$("#" + currentColour).addClass("pressed");
setTimeout(function () {
$("#" + currentColour).removeClass("pressed");
}, 100);
}
I would rate the code a 7 out of 10. The code is generally readable and well-structured. However, there are some areas where it could be improved for better readability and modularity.
That's it for the report! Let me know if you need any further assistance. Happy coding!
Hey Ashish, As you have recovered your excluded repo. Now I am contributed again with another project. I hope you will take my PR under the consideration. Pls add "hacktoberfest-accepted" label.
Describe your change:
Checklist:
ATTACH SCREEN-SHOTS