from simulation.entity import SimAgent, Food, Nest
from simulation.environment import Environment
import random
import simulation.preconditions as pc


class TestPreConditions:
    env = Environment()
    entities = [Food(position=(6, 6)), Nest(position=(8, 8), size=(4, 4))]

    def test_on_border(self):
        agent = SimAgent(position=(0, 5))
        assert pc.on_border(agent, self.entities, self.env)

    def test_on_nest(self):
        agent = SimAgent(position=(10, 6))
        assert pc.on_nest(agent, self.entities, self.env)

    def test_on_food(self):
        agent = SimAgent(position=(6, 6))
        assert pc.on_food(agent, self.entities, self.env)

    def test_holding_food(self):
        agent = SimAgent()
        agent.holding_food = True
        assert pc.holding_food(agent, self.entities, self.env)

bc9aced92b8a2c6d387580d4cc3a689f01e10cab
<mask token>


class TestPreConditions:
    <mask token>
    <mask token>

    def test_on_border(self):
        agent = SimAgent(position=(0, 5))
        assert pc.on_border(agent, self.entities, self.env)

    def test_on_nest(self):
        agent = SimAgent(position=(10, 6))
        assert pc.on_nest(agent, self.entities, self.env)
    <mask token>
    <mask token>

<mask token>


class TestPreConditions:
    <mask token>
    <mask token>

    def test_on_border(self):
        agent = SimAgent(position=(0, 5))
        assert pc.on_border(agent, self.entities, self.env)

    def test_on_nest(self):
        agent = SimAgent(position=(10, 6))
        assert pc.on_nest(agent, self.entities, self.env)
    <mask token>

    def test_holding_food(self):
        agent = SimAgent()
        agent.holding_food = True
        assert pc.holding_food(agent, self.entities, self.env)

<mask token>


class TestPreConditions:
    env = Environment()
    entities = [Food(position=(6, 6)), Nest(position=(8, 8), size=(4, 4))]

    def test_on_border(self):
        agent = SimAgent(position=(0, 5))
        assert pc.on_border(agent, self.entities, self.env)

    def test_on_nest(self):
        agent = SimAgent(position=(10, 6))
        assert pc.on_nest(agent, self.entities, self.env)

    def test_on_food(self):
        agent = SimAgent(position=(6, 6))
        assert pc.on_food(agent, self.entities, self.env)

    def test_holding_food(self):
        agent = SimAgent()
        agent.holding_food = True
        assert pc.holding_food(agent, self.entities, self.env)

from simulation.entity import SimAgent, Food, Nest
from simulation.environment import Environment
import random
import simulation.preconditions as pc


class TestPreConditions:
    env = Environment()
    entities = [Food(position=(6, 6)), Nest(position=(8, 8), size=(4, 4))]

    def test_on_border(self):
        agent = SimAgent(position=(0, 5))
        assert pc.on_border(agent, self.entities, self.env)

    def test_on_nest(self):
        agent = SimAgent(position=(10, 6))
        assert pc.on_nest(agent, self.entities, self.env)

    def test_on_food(self):
        agent = SimAgent(position=(6, 6))
        assert pc.on_food(agent, self.entities, self.env)

    def test_holding_food(self):
        agent = SimAgent()
        agent.holding_food = True
        assert pc.holding_food(agent, self.entities, self.env)
