refactoring game