larsgw / censordle

Guess Wikipedia article titles based on the censored contents of their articles
https://larsgw.github.io/censordle/
MIT License
2 stars 2 forks source link

Permit playing missed days #14

Closed hexylena closed 1 year ago

hexylena commented 1 year ago

This PR permits supplying a ?days=N URL parameter which will load the specified game, instead of forcibly loading todays game. As a result, instead of spoiling missed days, it now links to those missed days, permitting the censordle superfans to go back and play days they missed for whatever reason. (It happened to us last week due to travel and it was rather disappointing since it felt like it would've been an enjoyable one.)

larsgw commented 1 year ago

I really like this idea, I just think that it might open up some issues with concurrent access to the player data. There are already some issues there, and this feature encourages players to play two days at simultaneously (or at least without reloading the page), which isn't really accounted for at the moment.

hexylena commented 1 year ago

aye, good point. user data could be scoped by day instead then, that would work around the race i had not at all considered

larsgw commented 1 year ago

Also IIRC (not sure at this point) the data is only loaded on page load, and written after every guess (so that players can resume at any point), but that would not work here.

larsgw commented 1 year ago

(as scores would also be overwritten, it's all in a single object right now)

hexylena commented 1 year ago

Ok, I think I can work up a solution for that.

larsgw commented 1 year ago

I guess we do need a "Give Up" button now...