예제 #1
0
        public void TravelTo(Location_Destination destination)
        {
            var LightYears = location.DistanceTo(destination);
            var velocity   = WarpMathEquation.WarpToLight();

            AddedAge += LightYears / velocity;


            location = destination;
        }
예제 #2
0
        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();
            }
        }
예제 #3
0
        public double DistanceTo(Location_Destination LocDestination) =>

        (Math.Sqrt(Math.Pow((LocDestination.X - this.X), 2) + Math.Pow((LocDestination.Y - this.Y), 2)));
예제 #4
0
 public Characters(Location_Destination location)
 {
     this.location = location;
     money         = 10000M;
 }