To get all ferries in a fleet:
Waterway::get_fleet() or Ferry::get_fleet()
FerryFleet::count_ferries()
Counting stuff per player should not be needed, count per FerryFleet instead.
I´ll add some functions to query a waterway whether it has a ferry, and to query the fleet how many waterways are unemployed.
Btw, the FerryFleet does not keep a list of all waterways that belong to it. They are remembered only while they need a ferry; when they get one, the ferryfleet forgets that waterway.
To get all ferries in a fleet: :get_fleet( ) or Ferry::get_fleet() :count_ ferries( )
Waterway:
FerryFleet:
Counting stuff per player should not be needed, count per FerryFleet instead.
I´ll add some functions to query a waterway whether it has a ferry, and to query the fleet how many waterways are unemployed.
Btw, the FerryFleet does not keep a list of all waterways that belong to it. They are remembered only while they need a ferry; when they get one, the ferryfleet forgets that waterway.