some refactoring

now the game is included in an anonymous function