Get a tile from its representation

This commit is contained in:
Yohann D'ANELLO
2020-10-16 16:41:38 +02:00
parent 413494ca8b
commit c0e5fe4400
2 changed files with 12 additions and 8 deletions

View File

@ -5,7 +5,7 @@ from dungeonbattle.interfaces import Map
class TestInterfaces(unittest.TestCase):
def test_map(self) -> None:
m = Map.load_from_string("ab\ncd\n")
m = Map.load_from_string(".#\n#.\n")
self.assertEqual(m.width, 2)
self.assertEqual(m.height, 2)
self.assertEqual(m.draw_string(), "ab\ncd")
self.assertEqual(m.draw_string(), ".#\n#.")