From 0104a79cb7d43ed9a7d4a90e9ef26152dca8515d Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sat, 25 Jun 2016 19:46:17 +0200 Subject: Don't sort input words on length --- Crosswords.icl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Crosswords.icl b/Crosswords.icl index 21cb2c4..038dc5b 100644 --- a/Crosswords.icl +++ b/Crosswords.icl @@ -38,6 +38,7 @@ Start w # (words,io) = readWords [] io # (ok,w) = fclose io w # cw = makeCrossword rand words +# cw = trace_n ("\nIntermediate:\n" + toString cw) cw # cw = fill rand fillwords cw # cw = trace_n ("\nResult:\n" + toString cw) cw = toLaTeX cw @@ -138,7 +139,7 @@ where // Make a crossword, try to lay all words connected makeCrossword :: RandomSeed [[#Char]] -> Crossword -makeCrossword r words = place r fits (sortl words) 0 zero +makeCrossword r words = place r fits words 0 zero // Place a number of words in a crossword, satisfying a predicate place :: RandomSeed PlacementOK [[#Char]] Int Crossword -> Crossword -- cgit v1.2.3