Summary: | Fifteen puzzle unsolvable | ||
---|---|---|---|
Product: | [Plasma] kdeplasma-addons | Reporter: | Malte Eggers <malte.e> |
Component: | General | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | floriandemaeyer.225, kde |
Priority: | NOR | ||
Version: | 5.5.4 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
URL: | https://en.wikipedia.org/wiki/15_puzzle#Solvability | ||
Latest Commit: | https://commits.kde.org/kdeplasma-addons/3516eda8107bda0c91fa8fa5ef7e6da34d995f6b | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | pull request for patch of fifteenPuzzle logic |
Description
Malte Eggers
2016-02-03 05:02:59 UTC
Created attachment 104697 [details]
pull request for patch of fifteenPuzzle logic
I submitted a pull request with a fix for the problem but realized this is probably not the correct way to do it, since my pull request is the only open one. Could someone please advise me how to submit this patch?
I experienced the same problem, I never got a solvable puzzle and am convinced the developer has just switched around the logic, so only unsolvable puzzles are generated. The patch is just to change one 0 to a 1, see my other comment. Your patch doesn't match your comment. Note that test for inversions being even or not is not the == 1 at the end but rather then (inversionsMod == 0) which is already there in the current code. Note the two sets of == in the same statement I think you've accidentally changed it to: if the size is even and the inversions are even, it's not solvable. Git commit 3516eda8107bda0c91fa8fa5ef7e6da34d995f6b by Igor Poboiko. Committed on 22/05/2017 at 15:51. Pushed by poboiko into branch 'master'. Fix fifteen puzzle solveability Differential Revision: https://phabricator.kde.org/D5913 M +2 -2 applets/fifteenPuzzle/package/contents/ui/FifteenPuzzle.qml https://commits.kde.org/kdeplasma-addons/3516eda8107bda0c91fa8fa5ef7e6da34d995f6b |