- def cmd_MAP_SIZE(self, yx):
- """Set self.map_size to yx, redraw self.terrain_map as '?' cells."""
- self.world.map_.set_size(yx)
- cmd_MAP_SIZE.argtypes = 'yx_tuple:nonneg'
+ def cmd_MAP(self, geometry, yx):
+ """Create new map of grid geometry, size yx and only '?' cells."""
+ legal_grids = {'Hex', 'Square'}
+ if geometry not in legal_grids:
+ raise ArgError('First map argument must be one of: ' +
+ ', '.join(legal_grids))
+ self.world.new_map(geometry, yx)
+ cmd_MAP.argtypes = 'string yx_tuple:nonneg'