Improved handling of game state by multiple windows.

This has been discussed in #13.