game refactored