Esempio n. 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);
         }
     }
 }
Esempio n. 2
0
        public void ChangeCoordinatesOfSolarSystemByOneDay()
        {
            CoordinatesTriger trg = new CoordinatesTriger();
            Galaxy            g   = new Galaxy();

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

            Assert.AreEqual(Math.Round(result.Item1, 3), Math.Round(400.027648, 3));
            Assert.AreEqual(Math.Round(result.Item2, 3), Math.Round(-259.972352, 3));
        }