Esempio n. 1
0
 def test_init_multiple(self):
     """Define the arena with several agents"""
     arena = Arena([("Random A", lambda seed: AgentRandom(seed)),
                    ("Random C", lambda seed: AgentRandom(seed)),
                    ("Random B", lambda seed: AgentRandom(seed))], 5)
     self.assertListEqual(arena.names(),
                          ["Random A", "Random C", "Random B"])
Esempio n. 2
0
 def test_init(self):
     """Define the arena init"""
     arena = Arena([], 5)
     self.assertListEqual(arena.names(), [])
Esempio n. 3
0
 def test_init_single(self):
     """Define the arena with one version"""
     arena = Arena([("Random", lambda seed: AgentRandom(seed))], 5)
     self.assertListEqual(arena.names(), ["Random"])