@@ -235,6 +235,7 @@ def _normalizeRect(self, x, y, width, height):
235235 def _normalizeCursor (self , x , y ):
236236 """return the normalized the cursor position."""
237237 width , height = self .getSize ()
238+ assert width != 0 and height != 0 , 'can not print on a console with a width or height of zero'
238239 while x >= width :
239240 x -= width
240241 y += 1
@@ -256,7 +257,7 @@ def _lockColors(self, forceUpdate=False):
256257 _lib .TCOD_console_set_default_foreground (self .console , self .fgcolor )
257258 #
258259
259- def setScrollMode (self , mode ):
260+ def setMode (self , mode ):
260261 """Configure how this console will react to the cursor writing past the
261262 end if the console.
262263
@@ -632,8 +633,11 @@ def getSize(self):
632633 """
633634 return self .width , self .height
634635
635- def getMap (self ):
636- """Return an iterator with every possible (x, y) value for this console."""
636+ def map (self ):
637+ """Return an iterator with every possible (x, y) value for this console.
638+
639+ It goes without saying that working on the console this way is a
640+ slow process, especially for Python, and should be minimized."""
637641 return itertools .product (range (self .width ), range (self .height ))
638642
639643 def move (self , x , y ):
0 commit comments