import collections
+from plomrogue.errors import ArgError
if y >= height_map:
raise ArgError('too large row number %s' % y)
width_line = len(line)
- if width_line > width_map:
- raise ArgError('too large map line width %s' % width_line)
+ if width_line != width_map:
+ raise ArgError('map line width %s unequal map width %s' % (width_line, width_map))
self.terrain = self.terrain[:y * width_map] + line +\
self.terrain[(y + 1) * width_map:]