iiitl / snake-game-js

0 stars 43 forks source link

Solved ISSUE#2 #18

Closed imranasumbul closed 5 months ago

imranasumbul commented 5 months ago

This is the pull request regarding Increase Snake Speed when Eating Food ISSUE #2 I've created separate functions for increasing the speed by n units( increaseSpeedByNunits(speed, n) ) and restoring it to the original value after the game ends( restoreSpeedToInitialValue(initialValue, speed) ) so that I don't disturb the codebase. In this case, the value of n equals 0.1.

https://github.com/iiitl/snake-game-js/assets/143505827/1d8c50b3-d102-4fba-a71d-d17dec6e0493

ANKITy102 commented 5 months ago

@imranasumbul, why pop is shown on speed increase?

imranasumbul commented 5 months ago

@ANKITy102 I just added that feature to make sure my logic is working well. I've commented out the popup code before making the PR.

On Fri, 15 Mar 2024, 20:02 Ankit Yadav, @.***> wrote:

@imranasumbul https://github.com/imranasumbul, why pop is shown on speed increase?

— Reply to this email directly, view it on GitHub https://github.com/iiitl/snake-game-js/pull/18#issuecomment-1999794884, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCG3TIYY3MX7PTFSZSQDLF3YYMA7ZAVCNFSM6AAAAABEXDMMP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJZG44TIOBYGQ . You are receiving this because you were mentioned.Message ID: @.***>

ANKITy102 commented 5 months ago

@imranasumbul, Nice work!