added concept of GameMode. all tested ok. about to merge back to master