X-Git-Url: https://git.sommitrealweird.co.uk/curses-crossword.git/blobdiff_plain/c61629808c83c4c73ca8e060ce463c1907442cd0..HEAD:/curses_crossword.py diff --git a/curses_crossword.py b/curses_crossword.py index 1576950..d18a8d7 100755 --- a/curses_crossword.py +++ b/curses_crossword.py @@ -3,6 +3,22 @@ Play a crossword puzzle in a curses grid. Takes a command line argument of the crossword puzzle file. """ +# curses_crossword.py - play crosswords in a terminal +# Copyright (C) 2009 Brett Parker +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import curses import curses.ascii @@ -256,10 +272,12 @@ def crossword(stdscr, crossworddata): if cluescury < cluespad.getmaxyx()[0] - (padbry - padtly): cluescury += 1 cluespad.refresh(cluescury, 0, padtly, padtlx, padbry - 1, padbrx - 1) + stdscr.refresh() if inch == curses.KEY_PPAGE: if cluescury > 0: cluescury -= 1 cluespad.refresh(cluescury, 0, padtly, padtlx, padbry - 1, padbrx - 1) + stdscr.refresh() if inch == curses.KEY_RIGHT: if gridx < (len(crossword["grid"][0]) - 1): gridx += 1