diff options
author | Florian Jung <flo@windfisch.org> | 2015-09-23 23:42:39 +0200 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2015-09-23 23:42:39 +0200 |
commit | 5cab19f25ec80cecc477d250ff22761b2cf28a86 (patch) | |
tree | 5ed75d079399a1c3ab0744b8ffc9386e8f18d7ff | |
parent | 1bb5b4ebf357fb80bab9414f5c482f6460b4e3db (diff) |
mechanic fix
-rw-r--r-- | mechanics.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mechanics.py b/mechanics.py index 727a258..6caaf2a 100644 --- a/mechanics.py +++ b/mechanics.py @@ -24,10 +24,10 @@ def random_own_cell(c): return c.player.world.cells[next(iter(c.player.own_ids))] def is_enemy(cell, c): - return (not cell.same_player(random_own_cell(c))) and cell.mass > 1.25 * get_my_smallest_cell(c).mass + return not cell.is_virus and not cell.is_food and not cell.is_ejected_mass and (not cell.same_player(random_own_cell(c))) and cell.mass > 1.25 * get_my_smallest_cell(c).mass def is_splitkiller(cell, c): - return (not cell.same_player(random_own_cell(c))) and cell.mass > 2.5 * get_my_smallest_cell(c).mass + return not cell.is_virus and not cell.is_food and not cell.is_ejected_mass and(not cell.same_player(random_own_cell(c))) and cell.mass > 2.5 * get_my_smallest_cell(c).mass and cell.mass < 10 * get_my_smallest_cell(c).mass def is_edible(cell, c): return cell.is_food or cell.is_ejected_mass or ( (not cell.same_player(random_own_cell(c))) and not is_enemy(cell,c) and get_my_largest_cell(c).mass > 1.25 * cell.mass ) |