32 lines
654 B
Python
32 lines
654 B
Python
import curses
|
|
|
|
from state import State
|
|
|
|
k = 0
|
|
|
|
gamestate = State()
|
|
gamestate.load()
|
|
terrain = gamestate.terrain
|
|
|
|
def main(stdscr):
|
|
mypad = curses.newpad(62,62)
|
|
for y in range(0,62):
|
|
mypad.addstr( y, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqerstuvwxyz1234567890")
|
|
|
|
mypad_pos = 0
|
|
mypad.refresh(mypad_pos, 0, 5, 5, 10, 30)
|
|
|
|
while (k != ord('q')):
|
|
mypad.refresh(mypad_pos, 0, 5, 5, 10, 30)
|
|
|
|
if k == curses.KEY_DOWN:
|
|
mypad_pos += 1
|
|
mypad.refresh(mypad_pos, 0, 5, 5, 10, 60)
|
|
elif k == curses.KEY_UP:
|
|
mypad_pos -= 1
|
|
mypad.refresh(mypad_pos, 0, 5, 5, 10, 60)
|
|
|
|
k = stdscr.getch()
|
|
|
|
curses.wrapper(main)
|