hryanjones / guess-my-word

A word guessing game, where you only know whether my word is before or after your guess. (An unofficial clone of the game previously available on simbase.org)
https://hryanjones.com/guess-my-word/
MIT License
64 stars 26 forks source link

Word picking at year rollover bug #46

Closed hryanjones closed 3 years ago

hryanjones commented 3 years ago

From Twitter DM:

Hi there and happy new year! Just a heads-up that the game today served up the same two words as - I think yesterday, or at least within the last couple days? Still playing daily here, always a pleasant morning ritual!

Bratface2 commented 3 years ago

Any idea when the bug will be fixed? Also, it is the same word from 12-31-20, gentle.

hryanjones commented 3 years ago

Looks like I knew this day would come:

https://github.com/hryanjones/guess-my-word/blob/master/index.js#L296

I think the best way to fix it would be to do both of these at the same time:

  1. duplicate the words that got duplicated in the list
  2. update the logic to handle the leap year

That way it shouldn't cause any issues with the current word.

Bratface2 commented 3 years ago

Did you notice how many people tried the word gentle, just in case (me among them)? Glad to see it's up& running again. Happy New Year.

On 1/2/2021 at 1:24 PM, "H. Ryan Jones" wrote: Looks like I knew this day would come:

https://github.com/hryanjones/guess-my-word/blob/master/index.js#L296

I think the best way to fix it would be to do both of these at the

same time: duplicate the words that got duplicated in the list update the logic to handle the leap year

That way it shouldn't cause any issues with the current word. 

—

You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

hryanjones commented 3 years ago

Actually I haven't made any changes yet. The bug happened because I hadn't yet handled the case of when there's a leap year rollover. I see a way to fix it so next leap year this shouldn't happen.

hryanjones commented 3 years ago

Okay, fixed this so it won't come up in 2024->2025 rollover.

Bratface2 commented 3 years ago

The guesses by all of the respondents aren't visible today (March 14, 2021)? Any idea what the problem is?

Bratface2 commented 1 year ago

Mould is the British spelling, American English has no mould, and British English has no mold. Australian and Canadian English favor the British spelling, though mold is fairly common in Canadian publications.