Exemple #1
0
 def test_reference_input(self):
     print("-------------------------------")
     print(func_name())
     width, height, infect_after, max_generations, seed = 3, 3, 6, 6, [
         0, 0, 0, 1, 0, 0, 1, 0, 1
     ]
     GOF.GameIntiation(width, height, infect_after, max_generations, seed)
Exemple #2
0
 def test_many_generations(self):
     print("-------------------------------")
     print(func_name())
     width, height, infect_after, max_generations, seed = 3, 3, 6, 1000, [
         0, 0, 0, 1, 0, 0, 1, 0, 1
     ]
     GOF.GameIntiation(width, height, infect_after, max_generations, seed)
Exemple #3
0
 def test_infection_only(self):
     print("-------------------------------")
     print(func_name())
     width, height, infect_after, max_generations, seed = 2, 3, 0, 6, [
         1, 0, 0, 1, 1, 1
     ]
     GOF.GameIntiation(width, height, infect_after, max_generations, seed)
Exemple #4
0
 def test_big_world(self):
     print("-------------------------------")
     print(func_name())
     width, height, infect_after, max_generations = 50, 50, 6, 6
     seed = np.random.choice([0, 1],
                             size=(width * height),
                             p=[1. / 3, 2. / 3])
     GOF.GameIntiation(width, height, infect_after, max_generations, seed)