Update engine.py (simulated).