Пример #1
0
 public void MakeOneDayFoward(Galaxy galaxy)
 {
     foreach (var solarSys in galaxy.SolarSystems)
     {
         _triger.ChangeCoordinatesOfSolarSystemByOneDay(solarSys);
         foreach (var planet in solarSys.Planets)
         {
             _triger.ChangeCoordinatesOfPlanetSystemByOneDay(planet, solarSys);
         }
     }
 }
Пример #2
0
        public void ChangeCoordinatesOfPlanetSystemByOneDay()
        {
            CoordinatesTriger trg = new CoordinatesTriger();
            Galaxy            g   = new Galaxy();

            g.CreateNormalGalaxy();
            //One day changes
            PlanetSystem           ps     = g.SolarSystems.ToArray()[1].Planets.ToArray()[3];
            Tuple <double, double> result = trg.ChangeCoordinatesOfPlanetSystemByOneDay(ps, g.SolarSystems.ToArray()[1]);

            Assert.AreEqual(Math.Round(result.Item1, 3), Math.Round(249.19737775501, 3));
            Assert.AreEqual(Math.Round(result.Item2, 3), Math.Round(1.8895, 3));
        }