def track(move=False): tommy.seth(tommy.towards(tina)) if intersect(tina, tommy): tommy.write("tag!") elif move: tommy.forward(9) else: tommy.forward(1) checkpos([tina, tommy], screen) screen.tracer(1)
def track(self, move=False): self.seth(self.towards(self.target)) if intersect(self.target, self): self.write("tag!") elif move: self.forward(9) else: self.forward(1) checkpos([self.target, self], screen) screen.tracer(1)
def track(self, move=False): screen.tracer(0) self.seth(self.towards(self.target) + random.randint(-25, 25)) self.width(self.distance(self.target.pos()) // 20) if intersect(self.target, self): x, y = self.pos() c1 = abs(x) c2 = abs(y) c3 = max(256, abs(sum([x, y]))) self.color((c1, c2, c3)) self.penup() self.goto(self.start) self.pendown() elif move: self.forward(9 + random.randint(-4, 0)) else: self.forward(1) checkpos([self.target, self], screen) screen.tracer(1)
def track(self, move=False): screen.tracer(0) self.seth(self.towards(self.target) + random.randint(-25,25)) self.width(self.distance(self.target.pos()) //20) if intersect(self.target,self): x,y = self.pos() c1 = abs(x) c2 = abs(y) c3 = max(256, abs(sum([x,y]))) self.color((c1, c2, c3)) self.penup() self.goto(self.start) self.pendown() elif move: self.forward(9+random.randint(-4,0)) else: self.forward(1) checkpos([self.target,self],screen) screen.tracer(1)