Curses based maze game writen in  python