1to9only / HoDoKu

This HoDoKu is my modifications to hobiwan's 2.2.0 Hodoku.jar [HoDoKu - v2.2.0 (Build 116)]
GNU General Public License v3.0
13 stars 2 forks source link

XY-Chain comparator Bug, @PseudoFish fix #16

Open 1to9only opened 3 years ago

1to9only commented 3 years ago

To import PseudoFish XY-Chain Bug Fix where a comparator bug leading to a crash while attempting to solve certain puzzles using XY-Chains.

XY-Chain Bug, to recreate:

1to9only commented 3 years ago

The fix is to uncomment these lines in SolutionStep.java:

2010,2014c2010,2014
< //            // change 20110512: short chains first!
< //            int chainDiff = compareChainLengths(o);
< //            if (chainDiff != 0) {
< //                return chainDiff;
< //            }
---
>             // change 20110512: short chains first!
>             int chainDiff = compareChainLengths(o);
>             if (chainDiff != 0) {
>                 return chainDiff;
>             }

However, those lines were commented out by hobiwan a long time ago to fix an ALS-Chains sorting problem, see here.

Commits on Mar 31, 2012
Fixed: #3513603: Search for all steps ignores ALS types
fixed a problem with sorting: ALS-Chains were sometimes sorted incorrectly

So fixing this issue will likely bring back the old ALS-Chains sorting problem!!