public void TravelTo(Location_Destination destination) { var LightYears = location.DistanceTo(destination); var velocity = WarpMathEquation.WarpToLight(); AddedAge += LightYears / velocity; location = destination; }
public void PrintLocationsAndDistances(int selector) { for (int i = 0; i < locations.Count; ++i) { Location_Destination destination = locations[i]; var distance = Traveler.location.DistanceTo(destination); //Console.Write($" - "); if (i == selector) { UI.Highlight(); } Console.WriteLine($"Location {destination.name}: Approximately {distance:F2} Light Years away."); UI.ResetColors(); } }
public double DistanceTo(Location_Destination LocDestination) => (Math.Sqrt(Math.Pow((LocDestination.X - this.X), 2) + Math.Pow((LocDestination.Y - this.Y), 2)));
public Characters(Location_Destination location) { this.location = location; money = 10000M; }