Beyond_Beyaan.Screens.ShipDesignScreen.AtLeastOneBetterComputer C# (CSharp) Метод

AtLeastOneBetterComputer() приватный Метод

private AtLeastOneBetterComputer ( float remainingSpace ) : bool
remainingSpace float
Результат bool
        private bool AtLeastOneBetterComputer(float remainingSpace)
        {
            if (_shipDesign.Computer != null && _shipDesign.Computer.Technology == _availableComputerTechs[_availableComputerTechs.Count - 1])
            {
                //Already the best computer
                return false;
            }
            int index = (_shipDesign.Computer == null ? -1 : _availableComputerTechs.IndexOf(_shipDesign.Computer.Technology)) + 1; //Just one level higher will suffice, and we know we will always have at least one computer tech
            return GetSpaceUsed(_availableComputerTechs[index], false) <= remainingSpace;
        }