public string GetFileName(Galaxy galaxy)
		{
			var faction1 = galaxy.GetPlanet(PlanetIDs[0]).FactionName;
			var faction2 = galaxy.GetPlanet(PlanetIDs[1]).FactionName;
			var offensiveFaction = galaxy.OffensiveFaction.Name;
			return GetFileName(galaxy, faction1, faction2, offensiveFaction);
		}
Exemple #2
0
        public string GetFileName(Galaxy galaxy)
        {
            var faction1         = galaxy.GetPlanet(PlanetIDs[0]).FactionName;
            var faction2         = galaxy.GetPlanet(PlanetIDs[1]).FactionName;
            var offensiveFaction = galaxy.OffensiveFaction.Name;

            return(GetFileName(galaxy, faction1, faction2, offensiveFaction));
        }
 public string GetHumanReadableEta(Galaxy gal)
 {
     if (gal.Turn < Arrives)
     {
         return(string.Format(
                    "{0}`s blockade fleet.\nInbound to {1}\nETA: {2} turns", OwnerName,
                    gal.GetPlanet(TargetPlanetID).Name, Arrives - gal.Turn));
     }
     else
     {
         return(string.Format(
                    "{0}`s blockade fleet.\nIn orbit of {1}\n", OwnerName,
                    gal.GetPlanet(TargetPlanetID).Name));
     }
 }
        public int EtaToPlanet(int planetID, Galaxy gal)
        {
            PointF curLoc;

            GetCurrentPosition(out curLoc, gal.Turn);
            return(CalculateEta(curLoc, gal.GetPlanet(planetID).Position));
        }
        public bool SetDestination(Galaxy gal, int targetPlanetID, out string message)
        {
            var planet = gal.GetPlanet(targetPlanetID);

            GetCurrentPosition(out Start, gal.Turn);
            TargetPlanetID = targetPlanetID;
            StartTurn      = gal.Turn;
            Destination    = planet.Position;
            Arrives        = StartTurn + CalculateEta(Start, Destination);
            message        = "ok";
            return(true);
        }