Esempio n. 1
0
        private static List <string> GetShortestTurnManeuvers()
        {
            List <string> bestTurnManeuvers = new List <string>();

            ManeuverHolder bestTurnManeuver = CurrentShip.GetManeuverHolders()
                                              .Where(n =>
                                                     n.Bearing == ManeuverBearing.Turn &&
                                                     n.Direction == ManeuverDirection.Left
                                                     )
                                              .OrderBy(n => n.SpeedInt)
                                              .FirstOrDefault();

            bestTurnManeuvers.Add(bestTurnManeuver.ToString());

            bestTurnManeuver = CurrentShip.GetManeuverHolders()
                               .Where(n =>
                                      n.Bearing == ManeuverBearing.Turn &&
                                      n.Direction == ManeuverDirection.Right
                                      )
                               .OrderBy(n => n.SpeedInt)
                               .FirstOrDefault();
            bestTurnManeuvers.Add(bestTurnManeuver.ToString());

            return(bestTurnManeuvers);
        }
Esempio n. 2
0
        private void ChangeComplexity(GenericShip ship, ref ManeuverHolder movement)
        {
            if (movement.ToString() == HostShip.AssignedManeuver.ToString())
            {
                return;
            }

            movement.ColorComplexity = GenericMovement.IncreaseComplexity(movement.ColorComplexity);
        }
Esempio n. 3
0
        public bool HasManeuver(ManeuverHolder maneuverStruct)
        {
            string maneuverString = maneuverStruct.ToString();

            return(HasManeuver(maneuverString));
        }