

def test_bot_teams(self):
    test_layout4 = ' ######\n                #0  1#\n                #2  3#\n                ###### '
    universe = CTFUniverse.create(test_layout4, 4)
    team_black = Team(0, (0, 2))
    team_white = Team(1, (3, 5))
    self.assertEqual(universe.teams[0], team_black)
    self.assertEqual(universe.teams[1], team_white)
    self.assertEqual(universe.bots[0].team_index, 0)
    self.assertEqual(universe.bots[2].team_index, 0)
    self.assertEqual(universe.bots[1].team_index, 1)
    self.assertEqual(universe.bots[3].team_index, 1)
    self.assertTrue(universe.bots[0].in_own_zone)
    self.assertTrue(universe.bots[1].in_own_zone)
    self.assertTrue(universe.bots[2].in_own_zone)
    self.assertTrue(universe.bots[3].in_own_zone)
    test_layout4 = ' ######\n                #1  0#\n                #3  2#\n                ###### '
    universe = CTFUniverse.create(test_layout4, 4)
    self.assertFalse(universe.bots[0].in_own_zone)
    self.assertFalse(universe.bots[1].in_own_zone)
    self.assertFalse(universe.bots[2].in_own_zone)
    self.assertFalse(universe.bots[3].in_own_zone)
    test_layout4 = ' ######\n                #0 2 #\n                # 1 3#\n                ###### '
    universe = CTFUniverse.create(test_layout4, 4)
    self.assertTrue(universe.bots[1].is_harvester)
    self.assertTrue(universe.bots[2].is_harvester)
    self.assertFalse(universe.bots[0].is_harvester)
    self.assertFalse(universe.bots[3].is_harvester)
    self.assertFalse(universe.bots[1].is_destroyer)
    self.assertFalse(universe.bots[2].is_destroyer)
    self.assertTrue(universe.bots[0].is_destroyer)
    self.assertTrue(universe.bots[3].is_destroyer)

dataset/ETHPy150Open ASPP/pelita/test/test_datamodel.py TestCTFUniverse.test_bot_teams/original