summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-30 09:47:10 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-25 06:41:38 (GMT)
commitc09b03ee146fa6aa829b9339aef2e53df4f1c5b7 (patch)
tree3e2b4ee672950eb2ede97d66b62deba1590444fd
parentcfd851759c367ade3e502bedc9429c03d7c4a669 (diff)
Wall: simplify. We always get Tile, never str
-rw-r--r--src/wall.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/wall.py b/src/wall.py
index 4fee35e..483e96c 100644
--- a/src/wall.py
+++ b/src/wall.py
@@ -84,10 +84,12 @@ class Wall(object):
"""define what tile this is"""
if element is None:
return tile
- elif isinstance(tile, Tile):
- return Tile(element)
+ assert isinstance(element, Tile), element
+ if isinstance(tile, Tile):
+ return element
else:
- tile.tile = Tile(element)
+ # tile is UITile
+ tile.tile = element
return tile
def deal(self, tiles=None, deadEnd=False):