betting game refactored