Beyond_Beyaan.FleetManager.GetShipCount C# (CSharp) Method

GetShipCount() public method

public GetShipCount ( Ship design ) : int
design Ship
return int
        public int GetShipCount(Ship design)
        {
            int amount = 0;
            //Gets the count of ships with this design in the empire
            foreach (var fleet in _fleets)
            {
                if (fleet.Ships.ContainsKey(design))
                {
                    amount += fleet.Ships[design];
                }
            }
            return amount;
        }