Conditions | 3 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | from intelligine.core.exceptions import BestMoleculeHere, MoleculeGlandDisabled |
||
24 | def appose(self): |
||
25 | if not self._enabled: |
||
26 | raise MoleculeGlandDisabled() |
||
27 | |||
28 | try: |
||
29 | DirectionMolecule.appose(self._context, |
||
30 | self._host.get_position(), |
||
31 | self.get_molecule()) |
||
32 | except BestMoleculeHere as best_molecule_here: |
||
33 | self._host.get_brain().set_distance_from_objective(best_molecule_here.get_best_distance()) |
||
34 | |||
42 | return self._enabled |