Skip to content

Commit

Permalink
fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
HokageM committed Feb 5, 2024
1 parent 8007add commit d246807
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ninjabees/Hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def onlooker_bees_phase(self):
for bee in self.bee_population:
if self.__current_foraging < self.max_cnt_foraging_bees:
# For every bee in population which is currently a scout bee and has not found food,
# set its food goal random where the probability of selecting a food source is proportional to its quality.
# set its food goal random where the probability of
# selecting a food source is proportional to its quality.
if bee.get_job() == BeeJob.Scout and not bee.has_found_food():
bee.set_food_goal(random.choices(self.found_food_sources,
weights=[self.calculate_food_source_quality(source) for source in
Expand All @@ -89,7 +90,7 @@ def onlooker_bees_phase(self):
bee.set_job(BeeJob.Forager)
self.__current_foraging += 1

if bee.get_job() == BeeJob.Forager and bee.get_food_goal() == None:
if bee.get_job() == BeeJob.Forager and bee.get_food_goal() is None:
bee.set_food_goal(random.choices(self.found_food_sources,
weights=[self.calculate_food_source_quality(source) for source in
self.found_food_sources],
Expand Down

0 comments on commit d246807

Please sign in to comment.