SUMMARY Shuffling the pieces has the chance of generating a solved puzzle. Which defeats the point of shuffling. STEPS TO REPRODUCE 1. Set grid size to 2 2. Click on the "shuffle" button until you have a grid that goes [1], [2], [3], [ ] OBSERVED RESULT A solved grid. EXPECTED RESULT No solved grid. If for some reason the internal random generator generated a solved grid, it should automatically reshuffle the board. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.3.5 KDE Frameworks Version: 6.14.0 Qt Version: 6.9.0 Kernel Version: 6.14.6-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 1600 Six-Core Processor Memory: 15.6 GiB of RAM Graphics Processor: AMD Radeon RX 570 Series Manufacturer: Gigabyte Technology Co., Ltd. Product Name: B450M DS3H
Can reproduce, but a 2x2 puzzle isn't much of a puzzle! I wonder if 3x3 should be the minimum size.
(In reply to Nate Graham from comment #1) > Can reproduce, but a 2x2 puzzle isn't much of a puzzle! I wonder if 3x3 > should be the minimum size. 2×2 is good for testing, and I guess if someone wants a truly easy win. I'd say it's fine to keep it as the minimum, users who want at least a small challenge can simply choose a higher number..
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/830
Git commit 1ed2c7ff69154e06cc890bf94c59bbcf40b34fa6 by Christoph Wolk. Committed on 29/05/2025 at 09:08. Pushed by cwo into branch 'master'. applets/fifteenpuzzle: don't shuffle into a solved puzzle When reshuffling the board, it's possible to immediately get an already solved puzzle. It's very unlikely for realistic board sizes, but can be triggered somewhat if you refresh a 2×2 board often for some reason. We might as well make sure it never happens. To do this easily, we convert the existing solution checker into a function with return value, rather than always immediately marking the board as solved if it is, and use that to reshuffle if needed. M +9 -4 applets/fifteenPuzzle/package/contents/ui/FifteenPuzzle.qml https://invent.kde.org/plasma/kdeplasma-addons/-/commit/1ed2c7ff69154e06cc890bf94c59bbcf40b34fa6
Git commit de00ace4af9f708401069f6bd2721fdfbbf1549c by Christoph Wolk. Committed on 29/05/2025 at 19:17. Pushed by cwo into branch 'Plasma/6.4'. applets/fifteenpuzzle: don't shuffle into a solved puzzle When reshuffling the board, it's possible to immediately get an already solved puzzle. It's very unlikely for realistic board sizes, but can be triggered somewhat if you refresh a 2×2 board often for some reason. We might as well make sure it never happens. To do this easily, we convert the existing solution checker into a function with return value, rather than always immediately marking the board as solved if it is, and use that to reshuffle if needed. (cherry picked from commit 1ed2c7ff69154e06cc890bf94c59bbcf40b34fa6) Co-authored-by: Christoph Wolk <cwo.kde@posteo.net> M +9 -4 applets/fifteenPuzzle/package/contents/ui/FifteenPuzzle.qml https://invent.kde.org/plasma/kdeplasma-addons/-/commit/de00ace4af9f708401069f6bd2721fdfbbf1549c