code refactoring
initializing a game from a file in a separate function