Code review comment for lp:~widelands-dev/widelands/ferry

Revision history for this message
Benedikt Straub (nordfriese) wrote :

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.

« Back to merge proposal