Convert MapGenerator to ES6