Integrating AI into Gaming: How It Works