Tests and implementation for map generator