Add Map.__str__

This commit is contained in:
Eryn Wells 2023-02-19 18:34:59 -08:00
parent 21c3b5d94f
commit 9bd287dc9f

View file

@ -103,3 +103,12 @@ class Map:
condlist=[self.highlighted, self.visible, self.explored],
choicelist=[self.tiles['highlighted'], self.tiles['light'], self.tiles['dark']],
default=Shroud)
def __str__(self):
string = ''
tiles = self.tiles['light']['ch']
for row in tiles:
string += ''.join(chr(n) for n in row) + '\n'
return string