Modify farm and fishtrap code slightly

This commit is contained in:
Nate Bowman
2026-11-08 20:51:38 -05:00
parent c6254e6d1e
commit e03911b78a
3 changed files with 42 additions and 56 deletions

View File

@@ -512,8 +512,10 @@ class TestWorld(unittest.TestCase):
new_food = 500 + amount_per_farm
self.assertResourcesMatch([new_food, 500, 500, 500], game.world)
self.assertEqual(0, len(game.world.gather.farms))
self.assertEqual(0, len(game.world.gather.unused_farms))
farms = game.world.gather.consumable_buildings[Tasks.FARM]
self.assertEqual(0, len(farms['used']))
self.assertEqual(0, len(farms['unused']))
def test_farm_too_many_farmers(self):
@@ -637,8 +639,10 @@ class TestWorld(unittest.TestCase):
new_food = 500 + amount_per_fishtrap
self.assertResourcesMatch([new_food, 500, 500, 500], game.world)
self.assertEqual(0, len(game.world.gather.fishtraps))
self.assertEqual(0, len(game.world.gather.unused_fishtraps))
traps = game.world.gather.consumable_buildings[Tasks.FISH_SHIP_TRAP]
self.assertEqual(0, len(traps['used']))
self.assertEqual(0, len(traps['unused']))
# fishing ships go back to fishing after trap is depleted
deep_rate_per_60 = 29.4