def tick(life): _threats = judgement.get_threats(life, ignore_escaped=2) for target in [LIFE[t] for t in _threats]: if numbers.distance(life['pos'], brain.knows_alife(life, target)['last_seen_at']) >= sight.get_vision(life): _threats.remove(target['id']) movement.escape(life, _threats)
def tick(life): _threats = judgement.get_threats(life, recent_only=True, limit_distance=sight.get_vision(life)) #_knows = brain.knows_alife_by_id(life, _threat) movement.escape(life, _threats)
def tick(life): _threats = judgement.get_threats(life, limit_distance=sight.get_vision(life)) return movement.escape(life, _threats)