]> git.sommitrealweird.co.uk Git - curses-crossword.git/commitdiff
skip to first blank in grid
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Wed, 1 Jul 2009 22:16:07 +0000 (23:16 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Wed, 1 Jul 2009 22:16:07 +0000 (23:16 +0100)
curses-crossword.py

index d11568a2ebedf894e1b70216b1df5688514ef7a7..a396105a983d4198742153496c14ca11faa21b41 100644 (file)
@@ -27,7 +27,7 @@ except:
     for number in range(0,10):
         superscript_numbers[str(number)] = str(number)
 
     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
 
 def parsecrossword(crossworddata):
     ingrid = False
@@ -178,7 +178,12 @@ def crossword(stdscr, crossworddata):
     gridx = 0
     gridy = 0
 
     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:
     while 1:
         c = stdscr.getch()
         if c == curses.ascii.ESC: