Add Map.__str__
This commit is contained in:
parent
21c3b5d94f
commit
9bd287dc9f
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue