Add engine.py and main.py

Signed-off-by: Ezio Yan <126ium@gmail.com>