Ignore pieces with only one state during solving. (#1323)
Straight up dumb off-by-one error. Oops!
This should make the solver a little faster (though it mostly uses the
piece state map to look up states, so the shorter piece list won't have
a huge effect).
diff --git a/lib/src/back_end/solver.dart b/lib/src/back_end/solver.dart
index 3a5d187..22bbdde 100644
--- a/lib/src/back_end/solver.dart
+++ b/lib/src/back_end/solver.dart
@@ -42,7 +42,7 @@
void traverse(Piece piece) {
// We don't need to worry about selecting pieces that have only one state.
- if (piece.states.isNotEmpty) unsolvedPieces.add(piece);
+ if (piece.states.length > 1) unsolvedPieces.add(piece);
piece.forEachChild(traverse);
}