]> git.sommitrealweird.co.uk Git - curses-crossword.git/commitdiff
deal with multiple answer clues
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Sun, 19 Jul 2009 13:10:40 +0000 (14:10 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Sun, 19 Jul 2009 13:10:40 +0000 (14:10 +0100)
curses_crossword.py

index 123c3eefea861820687f6257062b9996bd9f6d0b..75643761cf91cbf06b7b58d538bf1510c2429b35 100755 (executable)
@@ -95,14 +95,14 @@ def parsecrossword(crossworddata):
             if inacross:
                 if line != "":
                     parts = line.split()
-                    question_number = int(parts[0])
+                    question_number = int(parts[0].split(",")[0])
                     clue = " ".join(parts[1:])
                     crossword["across"][int(question_number)] = \
                         clue.encode(code)
             if indown:
                 if line != "":
                     parts = line.split()
-                    question_number = int(parts[0])
+                    question_number = int(parts[0].split(",")[0])
                     clue = " ".join(parts[1:])
                     crossword["down"][int(question_number)] = clue.encode(code)
     num_cols = len(crossword["grid"][0])