]> git.cworth.org Git - lmno.games/commit
Arrange tiles neatly when reloading the game
authorCarl Worth <cworth@cworth.org>
Sun, 8 Mar 2026 14:16:51 +0000 (10:16 -0400)
committerCarl Worth <cworth@cworth.org>
Sun, 8 Mar 2026 14:16:51 +0000 (10:16 -0400)
commit9d05ebbaeb47173867b43f608083d830e9eecd37
tree712c86639ee60ffc573d3976ae16a174752376d2
parent3504e216f4ffbea4977fa1fb1b869239eb7cc45b
Arrange tiles neatly when reloading the game

The random positioning (which we use for one-at-a-time dealing of
tiles) was failing here, because each tile's random position was being
chosen against an empty playfield, (the tiles are being added in bulk
and the state isn't being updated between tiles). So the letters ended
up piling on top of each other.

We have a nice way to arrange non-overlapping tiles with the
shuff_tiles() function, so just call that once when doing a bulk
receive of tiles.
anagrams/anagrams.jsx