Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support saving and loading checkpoints #113

Merged
merged 5 commits into from
Feb 28, 2019
Merged

Conversation

philschatz
Copy link
Owner

@philschatz philschatz commented Feb 24, 2019

Some games use checkpoints rather than levels to save the players' progress. These are usually large games that require the player to move between multiple screens in order to complete puzzles. This PR adds support for saving and loading those checkpoints 🎉

Refs #104 and #107

TODO

  • store each checkpoint in a separate key in localStorage (& clear them when the level changes)

Screencap showing that progress is saved by reloading the page a couple of times:

kapture 2019-02-24 at 13 30 32

/cc @lwtchu . This PR will likely also fix the other 0% and 100% complete bugs 😄

still need to store them in a separate key in localStorage (& clear them when the level changes)
@codecov
Copy link

codecov bot commented Feb 24, 2019

Codecov Report

Merging #113 into master will increase coverage by 0.03%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
+ Coverage   47.99%   48.03%   +0.03%     
==========================================
  Files         144      144              
  Lines       11840    11848       +8     
  Branches      854      856       +2     
==========================================
+ Hits         5683     5691       +8     
  Misses       5985     5985              
  Partials      172      172
Impacted Files Coverage Δ
src/replaySolutions/helper.ts 93.05% <100%> (ø) ⬆️
src/util.ts 90.54% <100%> (ø) ⬆️
src/cli/playGame.ts 36.17% <100%> (ø) ⬆️
src/engine.ts 88.79% <80%> (+0.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9c1bd1...b7229cc. Read the comment docs.

@philschatz philschatz changed the title [WIP] support saving and loading checkpoints support saving and loading checkpoints Feb 28, 2019
@philschatz philschatz merged commit d4ac709 into master Feb 28, 2019
@philschatz philschatz deleted the support-checkpoints branch February 28, 2019 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant