flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

Snake Plugin: Store game state on close and restore it on restart, show highscore

Open JuanJakobo opened this issue 2 years ago • 5 comments

What's new

  • Implements #1041 as it safes the current game state and restores it on restart
  • Saves also an highscore to an file and shows the highscore on GameOver

Verification

  • Open App and close it after moving a little bit around, reopen it and the state should be as before.
  • Close the App when GameOver Screen is shown. The Game should restart normal.
  • Crash the snake and see if the highscore is shown. Do it again with an higher score and see if it increased, further do it with a lower score to verify if it stays the same.

Checklist (For Reviewer)

  • [ ] PR has description of feature/bug or link to Confluence/Jira task
  • [ ] Description contains actions to verify feature/bugfix
  • [ ] I've built this code, uploaded it to the device and verified feature/bugfix

JuanJakobo avatar Oct 24 '22 16:10 JuanJakobo

@DrZlo13 is currently formalizing rules for ext apps storage layout. He'll be reviewer for this PR

skotopes avatar Oct 25 '22 23:10 skotopes

@JuanJakobo Hello! I am now busy formalizing the rules for placing user files and supporting these rules in the firmware. It's enough for me for now if you put this file in "/ext/apps_data/snake_game".

DrZlo13 avatar Nov 08 '22 12:11 DrZlo13

@DrZlo13 Hi, I moved the file storage to "/ext/apps_data/snake_game".

JuanJakobo avatar Nov 14 '22 09:11 JuanJakobo

@DrZlo13 please review.

skotopes avatar Dec 10 '22 20:12 skotopes

Please un-draft when ready ;-) And let me know if you need any help

skotopes avatar Dec 12 '22 17:12 skotopes

I can't tell whether this means it was merged or is dead.

fennectech avatar Mar 13 '23 20:03 fennectech

@fennectech dead, PR was closed before merged

skotopes avatar Mar 14 '23 05:03 skotopes