We've been playing scrabble together for years so it's nice I'm finally competent enough to code this online version.
I posted it on reddit and now over 1000 people are playing against my dad everyday haha.
We've been playing scrabble together for years so it's nice I'm finally competent enough to code this online version.
I posted it on reddit and now over 1000 people are playing against my dad everyday haha.
My only gripe is: any time you click away from the tab, when you click back to it it resets the screen (shuffles the pile and clears any letters you had placed)
The reason it was there is some days I opened the tab on my iphone and for some reason it still showed the yesterdays result rather than the new day's letters.
Will have a think of a better way to force the refresh of the letters on a new day.
This'll be the Cache-Control header interacting with tab resume: rather than setting that to expire after X time has elapsed, set it to expire at time=T, and the browser will¹ fetch the new page instead. You'd increase the effectiveness of this technique (and reduce your bandwidth requirements for repeat players) if you made `/daily` a static page, and factored out those JavaScript variables into a separate file, fetched with `fetch` or `XMLHttpRequest` (or even a `<script>` tag, like `wordlist.js` is).
If I've configured my browser to behave otherwise (e.g. it takes me longer than a day to solve each puzzle), I really don't want it overriding that and resetting on me: that would make me very sad.
¹: usually. Firefox Session Restore behaves differently – but that's expected behaviour. Every website ever behaves like that: it's what I expect, because I expect to be able to close my browser and open it again and still have more-or-less the same pages available. After all, I've got a refresh button, but no un-refresh button.
- could be nice to have it calculate and show the score of the word you have currently placed
- when you place a tile on the DL or TL you can't see where the DL and TL are any more (I think on Scrabble board they have little triangles that stick out past the edges?)
- I found myself wanting to know the 'target' score, but I guess that would change the experience a bit
(I don't know if you are aware, but in French speaking countries, competition are mostly played this way, everyone with the same letters. At the end everybody got its own points and the best word is placed on the board)
Wow no I didn't know that is how the french play. I believe it is a much fairer version of the game and better tests the players skill