Commit 0d8cfd1a authored by Constantin's avatar Constantin
Browse files

minor typos

parent 220b7e3e
...@@ -39,7 +39,7 @@ class Labyrinth: ...@@ -39,7 +39,7 @@ class Labyrinth:
if width is not None: # empty labyrinth of given size if width is not None: # empty labyrinth of given size
assert height is not None assert height is not None
assert stream is None assert stream is None
self.tiles = [[Labyrinth.Field(GroundType.FLOOR,col,row,self) for col in range(width)] for row in range(height)] self.tiles = [[Labyrinth.Field(Labyrinth.GroundType.FLOOR,col,row,self) for col in range(width)] for row in range(height)]
elif height is not None: elif height is not None:
assert False # width None, height not assert False # width None, height not
elif stream is not None: elif stream is not None:
...@@ -51,10 +51,10 @@ class Labyrinth: ...@@ -51,10 +51,10 @@ class Labyrinth:
for rownum,line in enumerate(stream): for rownum,line in enumerate(stream):
row = [] row = []
for colnum,char in enumerate(line): for colnum,char in enumerate(line):
if char in [' ','0']: if char in [' ','0','_']:
row.append(Labyrinth.Field(GroundType.FLOOR,colnum,rownum,self)) row.append(Labyrinth.Field(Labyrinth.GroundType.FLOOR,colnum,rownum,self))
elif char in ['W','w','#','1']: elif char in ['W','w','#','1']:
row.append(Labyrinth.Field(GroundType.WALL,colnum,rownum,self)) row.append(Labyrinth.Field(Labyrinth.GroundType.WALL,colnum,rownum,self))
tiles.append(row) tiles.append(row)
return tiles return tiles
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment