3 ms·
Like others I found the concise implementation to be impressive! I have noticed a bug though. Using the "drive into the corner" strategy (I keep the high tile i
by bvanderveen 1y ago
Like others I found the concise implementation to be impressive! I have noticed a bug though. Using the "drive into the corner" strategy (I keep the high tile in the bottom left) sometimes the top left tile randomly gets a smaller value (e.g., goes from 16 -> 4) when I slide to the left.
- chadrs 1y agoYeah, the first few times I thought maybe I was just imagining it; but I went from STATE=7280398215952, tried to merge my 64s into the left corner and instead ended up in STATE=7280398025476; my 64s have become 4s. Can't reproduce it exactly as it happened, but if I run `STATE=7280398215952 bash 2048.bash` and press a 8 times, the 128 always becomes a 2.
- shawabawa3 1y agoDoesn't happen for me, i wonder if it's only on certain architectures or certain versions of bash or something
- TMWNN 1y agoI saw it happen on bash 3.2.25.
- izabera 1y agothanks, i fixed it. it was only happening on bash 3.2 and i don't use a mac so i didn't see it. https://github.com/izabera/bitwise-challenge-2048/commit/73fe28636b508df686f1200182b4641e2e8a7057 https://github.com/izabera/bitwise-challenge-2048/commit/73f...