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

Fix save game #172

Merged
merged 17 commits into from
Jul 22, 2023
Merged

Fix save game #172

merged 17 commits into from
Jul 22, 2023

Conversation

oskarrough
Copy link
Owner

@oskarrough oskarrough commented Sep 3, 2022

Something in the state that we JSON serialize can't be parsed. Find what it is and learn how to make it serializable.

The PR doesn't work yet.

Think one of the issues is that cards have an upgrade() function which can't be stringified.

Closes #171

@oskarrough oskarrough self-assigned this Jul 15, 2023
@oskarrough oskarrough added the bug Something isn't working label Jul 15, 2023
@cloudflare-pages
Copy link

cloudflare-pages bot commented Jul 21, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 07c93d2
Status: ✅  Deploy successful!
Preview URL: https://b1bb9642.slaytheweb.pages.dev
Branch Preview URL: https://fix-savegame.slaytheweb.pages.dev

View logs

@oskarrough
Copy link
Owner Author

OK seems to work now.

The main issue was me not understanding javascript assign by value vs reference with objects. Previously upgraded cards would upgrade all instances instead of the specific one.

@oskarrough oskarrough marked this pull request as ready for review July 22, 2023 08:18
@oskarrough oskarrough merged commit ae6663c into main Jul 22, 2023
3 checks passed
@oskarrough oskarrough deleted the fix/savegame branch September 14, 2023 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save game UI is broken
1 participant