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); }
private void ChangeComplexity(GenericShip ship, ref ManeuverHolder movement) { if (movement.ToString() == HostShip.AssignedManeuver.ToString()) { return; } movement.ColorComplexity = GenericMovement.IncreaseComplexity(movement.ColorComplexity); }
public bool HasManeuver(ManeuverHolder maneuverStruct) { string maneuverString = maneuverStruct.ToString(); return(HasManeuver(maneuverString)); }