Added the JavaScriptEngine to the GameFactory factory method.