view Bacteria.py @ 10:50d862c2c691
Now all initial widgets are diabled after submit button is pressed
| author |
Yashina Ksenia <ksenia_yashina@kodomo.fbb.msu.ru> |
| date |
Wed, 08 Dec 2010 00:30:58 +0300 |
| parents |
44ab407f134f |
| children |
5cc5069458a9 |
line source
3 class Bacteria (object):
4 def __init__ (self, position, velocity, lifetime, mutated):
10 def check_collision (self, bacteria):
12 if 0<abs(self.position-bact.position)<3:
16 def move (self, delta_t, radius):
19 def collision (self, other, delta_t):
22 def reprod (type, env, p_max):
27 return randrange(0, int(1/p))==0
29 def asexual (self, bacteria, delta_t, radius):
32 def sexual (self, other, bacteria, delta_t, radius):
35 def find_place_a (self, bacteria): #searches for place for children
38 def find_place_s (self, other, bacteria):