change engine to be private, rewrite game core