Пример #1
0
    def test_calculate_items_on_map(self):
        map = Map()
        map.generate(20, 10, EMPTY)
        count = 0
        for x, y in [[0, 0], [3, 4], [5, 6]]:
            count += 1
            map.put(x, y, TREE)

        self.assertEqual(map.count(TREE), count)
        self.assertEqual(map.count(EMPTY), 20 * 10 - count)
Пример #2
0
 def test_place_items_on_map(self):
     map = Map()
     map.generate(20, 10, EMPTY)
     map.place(20, TREE)
     self.assertEqual(map.count(TREE), 20)