From 93abf50bf3f0f32684dbd9cc73179a8b1220b69d Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Wed, 1 Jul 2009 23:16:07 +0100 Subject: [PATCH 1/1] skip to first blank in grid --- curses-crossword.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/curses-crossword.py b/curses-crossword.py index d11568a..a396105 100644 --- a/curses-crossword.py +++ b/curses-crossword.py @@ -27,7 +27,7 @@ except: for number in range(0,10): superscript_numbers[str(number)] = str(number) -crossworddata = codecs.open("g2-20090701.txt", "r", "utf-8").read() +crossworddata = codecs.open("crossword.output", "r", "utf-8").read() def parsecrossword(crossworddata): ingrid = False @@ -178,7 +178,12 @@ def crossword(stdscr, crossworddata): gridx = 0 gridy = 0 - stdscr.move(1,3) + while crossword["grid"][gridy][gridx] == "x": + curx += 4 + gridx += 1 + + stdscr.move(cury,curx) + while 1: c = stdscr.getch() if c == curses.ascii.ESC: -- 2.39.5