diff --git a/labyrinth.py b/labyrinth.py index f658e667a7dd1b1d4bd6b8a2c3800b1bb4f7e861..7d7d3e2a1e7bc255364f98dccc766f0fcb4037b0 100644 --- a/labyrinth.py +++ b/labyrinth.py @@ -39,7 +39,7 @@ class Labyrinth: if width is not None: # empty labyrinth of given size assert height is not 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: assert False # width None, height not elif stream is not None: @@ -51,10 +51,10 @@ class Labyrinth: for rownum,line in enumerate(stream): row = [] for colnum,char in enumerate(line): - if char in [' ','0']: - row.append(Labyrinth.Field(GroundType.FLOOR,colnum,rownum,self)) + if char in [' ','0','_']: + row.append(Labyrinth.Field(Labyrinth.GroundType.FLOOR,colnum,rownum,self)) 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) return tiles