wlof / gameoflife

A simple Python implementation of Conway's Game of Life using the curses library.
MIT License
3 stars 0 forks source link

Create a window manager (sort of) #11

Open wlof opened 9 years ago

wlof commented 9 years ago

In order to add a help window, and future save/load windows, I need some sort of window manager.

This would be pretty easy to do if I could rely on curses.panel. However, this extension appears to not be supported by the unofficial MS Windows curses package. (Calling curses.update_panels() crashes the Python interpreter.)

I'd rather not rely on somewhat obscure extensions and libraries (PDCurses & al.), and I want the game to remain cross-platform compatible (which, in hindsight, makes using curses a questionable choice...), so I'll probably write my own basic window manager to emulate the panel functions. I don't need anything too fancy so I can probably get away with something relatively basic.

Also, the GameApp class still does too much UI stuff (see #7). Offloading all the UI stuff to a dedicated WindowManager class would make for better code anyway.