Пример #1
0
    def test_get_worker(self):
        level = self.make_level_simple()
        world = World(level)

        tile = world.get((4, 1))

        self.assertEqual(tile.worker, True)
Пример #2
0
    def test_get_box(self):
        level = self.make_level_simple()
        world = World(level)

        tile = world.get((2, 1))

        self.assertEqual(tile.box, True)
Пример #3
0
    def test_get_dock(self):
        level = self.make_level_simple()
        world = World(level)

        tile = world.get((1, 1))

        self.assertEqual(tile.dock, True)
Пример #4
0
    def test_get_floor(self):
        level = self.make_level_simple()
        world = World(level)

        tile = world.get((1, 1))

        self.assertEqual(tile.wall, False)
Пример #5
0
    def test_get_wall(self):
        level = self.make_level_simple()
        world = World(level)

        tile = world.get((0, 0))

        self.assertEqual(tile.wall, True)
Пример #6
0
    def test_push_box(self):
        level = self.make_level_simple()
        world = World(level)

        world.push_box((2, 1), (1, 1))

        tile = world.get((1, 1))
        self.assertEqual(tile.box, True)
        self.assertEqual(tile.dock, True)