|
|
@ -14,6 +14,12 @@ logging.basicConfig( format='%(asctime)s [%(levelname)s] %(funcName)s: %(message |
|
|
|
|
|
|
|
field = Field() |
|
|
|
|
|
|
|
def display_source(stdscr,source): |
|
|
|
|
|
|
|
stdscr.clear() |
|
|
|
stdscr.addstr(0,0,source) |
|
|
|
key = stdscr.getch() |
|
|
|
|
|
|
|
def inputLoop(stdscr): |
|
|
|
exitPrg = False |
|
|
|
curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLACK) |
|
|
@ -34,6 +40,7 @@ def inputLoop(stdscr): |
|
|
|
case 'g': |
|
|
|
generator = SourceGenerator() |
|
|
|
source = generator.generate_source(field) |
|
|
|
display_source(stdscr,source) |
|
|
|
logging.debug(f'source={source}') |
|
|
|
case ' ': |
|
|
|
field.togglePixel() |
|
|
|