PalashBansal / Pacman

Game based on collision detection in Javascript
http://palashbansal.github.io/Pacman
MIT License
3 stars 4 forks source link

Best score doesn't get saved #7

Closed PalashBansal closed 4 years ago

PalashBansal commented 4 years ago

Description of the Issue

"Best Score" gets updated with "Current Score" at first run but doesn't get saved in browser cookies.

Steps to Reproduce the Issue

  1. Navigate to- http://palashbansal.github.io/Collision/
  2. Start playing game.
  3. "Best score" is changed
  4. Reload game, and find that best score reset to 0

Expected Behavior

Best score should be highest recorded until cookies are cleared.

Actual Behavior

Best score is not getting stored in browser cookies

PalashBansal commented 4 years ago

@aswinvenugopal1992 You might be interested in this issue.

astriskit commented 4 years ago

I'll look into it @PalashBansal

astriskit commented 4 years ago

@PalashBansal - I wonder, have you tried fixing this bug or something; I see comments removing cookie specific code in Game.js- which made me curious - what was it that you were trying to do; And what was the outcome.

PalashBansal commented 4 years ago

@PalashBansal - I wonder, have you tried fixing this bug or something; I see comments removing cookie specific code in Game.js- which made me curious - what was it that you were trying to do; And what was the outcome.

You are right @astriskit I was trying to create this functionality around 5 years ago but couldn't. I wanted to save best score in cookies as long as user doesn't clears it.