Beyond_Beyaan.Fleet.ConfirmPath C# (CSharp) Method

ConfirmPath() public method

public ConfirmPath ( ) : bool
return bool
        public bool ConfirmPath()
        {
            if (_tentativeNodes != null)
            {
                foreach (var node in _tentativeNodes)
                {
                    if (!node.IsValid)
                    {
                        return false;
                    }
                }
                TravelNode[] nodes = new TravelNode[_tentativeNodes.Count];
                _tentativeNodes.CopyTo(nodes);
                _tentativeNodes = null;

                _travelNodes = new List<TravelNode>(nodes);
            }
            else
            {
                //Null because target is either invalid or the system the fleet is currently adjacent
                _travelNodes = null;
                _tentativeNodes = null;
            }
            return true;
        }