Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- class AutoSpacecraftGen {
- public static boolean MStringS(String[] strings, String tbc) {
- boolean IsThere = false;
- for (String s : strings) {
- if (tbc.contains(s)) {
- IsThere = true;
- break;
- }
- }
- return IsThere;
- }
- public static int rN (double add, int maxV){
- return (int)(add + (Math.random() * maxV));
- }
- public static String rand(String[] array){
- Collections.shuffle(Arrays.asList(array));
- Random arrayChosen = new Random();
- int arrayChosen_index = arrayChosen.nextInt(array.length);
- return array[arrayChosen_index];
- }
- public static int findex(String[] array, String searched){
- ArrayList<String> clist = new ArrayList<>();
- Collections.addAll(clist, array);
- return clist.indexOf(searched);
- }
- public static String[] split(String string, String Separator) {
- return string.split(Separator);
- }
- public static String ass_crack(String[] engine_Name1, String[] firstPart) {
- String engine_Name;
- Collections.shuffle(Arrays.asList(engine_Name1));
- Collections.shuffle(Arrays.asList(firstPart));
- Random engineNameChosen = new Random();
- Random firstPartC = new Random();
- int engineNameChosen_index = engineNameChosen.nextInt(engine_Name1.length);
- int firstPart_index = firstPartC.nextInt(firstPart.length);
- String engNameFinalf = " " + engine_Name1[engineNameChosen_index];
- String firstPart_f = firstPart[firstPart_index] + "-";
- int finalNumber = 12 + ((int) (Math.random() * 999));
- if (finalNumber % 8 == 0) {
- engine_Name = firstPart_f + finalNumber + engNameFinalf;
- } else {
- char randomizedCharacter;
- int uio93 = 1 + ((int) (Math.random() * 999));
- int uio94 = 1 + ((int) (Math.random() * 11));
- Random randomLetter = new Random();
- if (uio93 % uio94 == 0) {
- randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
- while (randomizedCharacter != 'l' || randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
- randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
- if (randomizedCharacter != 'l' && randomizedCharacter != 'o' && randomizedCharacter != 'i' && randomizedCharacter != 'q' && randomizedCharacter != 'e' && randomizedCharacter != 'h' && randomizedCharacter != 'g' && randomizedCharacter != 'c' && randomizedCharacter != 'j') {
- break;
- }
- }
- } else {
- randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
- while (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
- randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
- if (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
- break;
- }
- }
- }
- engine_Name = firstPart_f + finalNumber + randomizedCharacter + engNameFinalf;
- }
- return engine_Name;
- }
- public static void Output(String purpose_Chosen, String spacecraft_Chosen, String spacecraft_Era, String mission_Life, String engine_Type,
- String thruster_Type, String orbit, String power_Gen, String att_Control, String mission_Type ,String oriention,
- String antenna, String Type) {
- System.out.println("Spacecraft Type: " + Type + " " + spacecraft_Chosen);
- System.out.println("Purpose: " + purpose_Chosen);
- System.out.println("Funding Source: -------------");
- System.out.println("Weight Range: -------------");
- System.out.println("Design Era: " + spacecraft_Era);
- System.out.println("Operational Life: " + mission_Life);
- System.out.println("Main Propulsion: " + engine_Type);
- System.out.println("Control Thrusters: " + thruster_Type);
- System.out.println("Structural Material: -------------");
- System.out.println("Operational Orbit: " + orbit);
- System.out.println("Power Generation: " + power_Gen);
- System.out.println("Attitude Control: " + att_Control);
- System.out.println("Mission Type: " + mission_Type);
- System.out.println("Navigational Equipment: " + oriention);
- System.out.println("Communication Equipment: " + antenna);
- System.out.println("Scientific Experiments: -------------");
- System.out.println("Additional Equipment: -------------");
- System.out.println('\n');
- }
- public static void main(String[] args) {
- /*
- long start = System.currentTimeMillis();
- File org = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/AutoSpacecraftGen/GenFiles");
- org.mkdir();
- // -------------------------------------
- File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/AutoSpacecraftGen/GenFiles/ofb_rex_b.docx");
- if (!(new File(String.valueOf(pathn1)).exists())) {
- XWPFDocument docx1 = new XWPFDocument();
- XWPFParagraph par1 = docx1.createParagraph();
- par1.setAlignment(ParagraphAlignment.CENTER);
- XWPFRun run1 = par1.createRun();
- run1.setText("Spacecraft Registry");
- run1.setFontFamily("Arial");
- run1.setBold(true);
- run1.setFontSize(33);
- run1.setTextPosition(60);
- // -----------------------------------------------------------------------------
- XWPFParagraph par2 = docx1.createParagraph();
- par2.setAlignment(ParagraphAlignment.RIGHT);
- XWPFRun run2 = par2.createRun();
- LocalDateTime date = LocalDateTime.now();
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yyyy, HH:mm:ss");
- String dt = date.format(formatter);
- run2.setText("Created on: " + dt);
- run2.setFontFamily("Arial");
- run2.setBold(true);
- run2.setFontSize(10);
- run2.setTextPosition(75);
- // ----------------------------------------------------------------------------------------------------
- try (FileOutputStream out1 = new FileOutputStream(String.valueOf(pathn1))) {
- docx1.write(out1);
- out1.close();
- docx1.close();
- }
- }
- */
- String repeatCommand = "y";
- Scanner scanner = new Scanner(System.in);
- /*
- File ops = new File("C:\\Users\\Public\\Operational_Functional_Block\\Java_projects\\src\\AutoSpacecraftGen\\DevData");
- ops.mkdir();
- System.out.println("Welcome to the Advanced Rocket Engine Generator!" + '\n');
- int y = 0, h = 0;
- ArrayList<Double> yi = new ArrayList<>(100);
- */
- while (!repeatCommand.equals("N")) {
- /*
- int am = 100;
- if ((new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/AutoSpacecraftGen/GenFiles/Data/ofb_rex_b[Full]" + am + ".docx")).exists())
- repeatCommand = "N";
- System.out.println("Do you want to generate a new engine? [Y/N]");
- System.out.print("> ");
- repeatCommand = scanner.next();
- Path onlyfans = Path.of(String.valueOf(pathn1));
- */
- if (repeatCommand.equalsIgnoreCase("N") || repeatCommand.equalsIgnoreCase("NO")) {
- /*
- float sum = 0;
- for (int u = 0; u < (yi.size() - 1); u++) sum = (float) (sum + yi.get(u));
- long end = System.currentTimeMillis();
- float timen = (float) (end - start) / 1000;
- int r = yi.size();
- String fugg = "Number of files created: " + am;
- String piss;
- if (r <= 1) {
- piss = '\n' + "Average amount of bytes per engine: " + (pathn1.length() / y) + " bytes";
- System.out.println(piss);
- } else {
- piss = '\n' + "Average amount of bytes per engine: " + (sum / yi.size()) + " bytes";
- System.out.println(piss);
- }
- String pussay = "Average amount of engines per file: " + sum + " engines";
- System.out.println(pussay);
- String hamstrings;
- if (timen < 60) {
- hamstrings = "Total run time: " + timen + " secs";
- System.out.println(hamstrings);
- } else if (timen / 60 < 2) {
- hamstrings = "Total run time: " + (int) Math.floor(timen / 60) + " min " + Math.round(timen % 60) + " secs";
- System.out.println(hamstrings);
- } else {
- hamstrings = "Total run time: " + (int) Math.floor(timen / 60) + " mins " + Math.round(timen % 60) + " secs";
- System.out.println(hamstrings);
- }
- String shoe = "Rate of engine generation: " + h / timen + " engines/second";
- System.out.println(shoe);
- String back = "Number of engines generated: " + h;
- System.out.println(back);
- try {
- FileWriter fwrite = new FileWriter("C:\\Users\\Public\\Operational_Functional_Block\\Java_projects\\src\\AutoSpacecraftGen\\DevData\\dev.txt", true);
- BufferedWriter fwriteFinal = new BufferedWriter(fwrite);
- fwriteFinal.write("===========================================================================");
- fwriteFinal.write('\n');
- fwriteFinal.write(fugg);
- fwriteFinal.write('\n');
- fwriteFinal.write(piss);
- fwriteFinal.write('\n');
- fwriteFinal.write(pussay);
- fwriteFinal.write('\n');
- fwriteFinal.write(hamstrings);
- fwriteFinal.write('\n');
- fwriteFinal.write(shoe);
- fwriteFinal.write('\n');
- fwriteFinal.write(back);
- fwriteFinal.write('\n' + '\n');
- fwriteFinal.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- */
- System.exit(0);
- } else if (repeatCommand.equalsIgnoreCase("Y") || repeatCommand.equalsIgnoreCase("YES")) {
- /*
- double sizeInbytes = pathn1.length();
- double sizeInKilobytes = (sizeInbytes / 1024);
- if (sizeInKilobytes >= 20) {
- yi.add(sizeInbytes / y);
- File logM = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/AutoSpacecraftGen/GenFiles/Data");
- logM.mkdir();
- // -------------------------------------------------------------------------------------------------
- if ((new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/AutoSpacecraftGen/GenFiles/Data/ofb_rex_b[Full].docx")).exists()) {
- int i;
- y = 0;
- int x = 2;
- for (i = 1; i < x; i++) {
- if ((new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/AutoSpacecraftGen/GenFiles/Data/ofb_rex_b[Full]" + i + ".docx")).exists()) {
- x++;
- } else {
- Files.copy(onlyfans, Paths.get("C:/Users/Public/Operational_Functional_Block/Java_projects/src/AutoSpacecraftGen/GenFiles/Data/ofb_rex_b[Full]" + i + ".docx"));
- }
- }
- } else {
- Path logPF = Paths.get("C:/Users/Public/Operational_Functional_Block/Java_projects/src/AutoSpacecraftGen/GenFiles/Data/ofb_rex_b[Full].docx");
- Files.copy(onlyfans, logPF);
- }
- XWPFDocument docx1 = new XWPFDocument();
- XWPFParagraph par1 = docx1.createParagraph();
- par1.setAlignment(ParagraphAlignment.CENTER);
- XWPFRun run1 = par1.createRun();
- run1.setText("Rocket Engine Generator");
- run1.setFontFamily("Arial");
- run1.setBold(true);
- run1.setFontSize(33);
- run1.setTextPosition(60);
- // -----------------------------------------------------------------------------
- XWPFParagraph par2 = docx1.createParagraph();
- par2.setAlignment(ParagraphAlignment.RIGHT);
- XWPFRun run2 = par2.createRun();
- LocalDateTime date = LocalDateTime.now();
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yyyy, HH:mm:ss");
- String dt = date.format(formatter);
- run2.setText("Created on: " + dt);
- run2.setFontFamily("Arial");
- run2.setBold(true);
- run2.setFontSize(10);
- run2.setTextPosition(60);
- // ----------------------------------------------------------------------------------------------------
- FileOutputStream out1 = new FileOutputStream(String.valueOf(pathn1));
- docx1.write(out1);
- out1.close();
- docx1.close();
- }
- */
- String[] engine_Name1 = {"\"Argosy\"", "\"Galileo\"", "\"Callisto\"", "\"Nauka\"", "\"Insider\"", "\"Granis\"",
- "\"Rassvet\"", "\"Zvezda\"", "\"Zarya\"", "\"Orion\"", "\"Ares\"", "\"Delta\"", "\"Atlas\"", "\"Dreadnought\"",
- "\"Daedalus\"", "\"Baltia\"", "\"Dizhou\"", "\"Hermes\"", "\"Icarus\"", "\"Connestoga\"", "\"Yupiter\"",
- "\"Emphasis\"", "\"Olympus\"", "\"Kronos\"", "\"Helios\"", "\"Alabaster\"", "\"Falcon\"", "\"Saturn\"",
- "\"Eagle\"", "\"Endeavour\"", "\"Atlantis\"", "\"Cygnus\"", "\"Apollo\"", "\"Horizon\"", "\"Bulava\"",
- "\"Pioneer\"", "\"Voyager\"", "\"Exploration\"", "\"Expedition\"", "\"Vulcan\"", "\"Vysota\"",
- "\"Federation\"", "\"Sojourner\"", "\"Nautilus\"", "\"Jubilance\"", "\"Lagrange\"", "\"Volna\"",
- "\"Prometheus\"", "\"Tellus\"", "\"Alpha\"", "\"Delta\"", "\"Proton\"", "\"Neutron\"", "\"Topol\"",
- "\"Electron\"", "\"Pluton\"", "\"Poodle\"", "\"Skipper\"", "\"Convair\"", "\"Nexus\"", "\"Oko\"",
- "\"Vector\"", "\"Terrier\"", "\"Rhino\"", "\"Panther\"", "\"Goliath\"", "\"Juno\"", "\"Shrimp\"",
- "\"Thumper\"", "\"Mainsail\"", "\"Dart\"", "\"Twitch\"", "\"Stratus\"", "\"Oscar\"", "\"Kosmos\"",
- "\"Sentinel\"", "\"Pegasus\"", "\"Kelus\"", "\"Starshot\"", "\"Vernor\"", "\"Mammoth\"", "\"Liberty\"",
- "\"Douglas\"", "\"Heimdall\"", "\"Dynetics\"", "\"Pathfinder\"", "\"Horizon\"", "\"Poisk\"",
- "\"Pirs\"", "\"Philae\"", "\"Mariner\"", "\"Centaur\"", "\"Orel\"", "\"Pratt\"", "\"Hyperion\"",
- "\"Sagittarius\"", "\"Apollo\"", "\"Bryton\"", "\"Volga\"", "\"Harmony\"", "\"Cassini\"", "\"Contour\"",
- "\"Altair\"", "\"Dream\"", "\"Baikal\"", "\"Zenith\"", "\"Urpinod\"", "\"Bernal\"", "\"Condor\"",
- "\"Athena\"", "\"Astra\"", "\"Aerolus\"", "\"Rombus\"", "\"Lunokhod\"", "\"Fregat\"", "\"Glonass\"",
- "\"Dragon\"", "\"Salyut\"", "\"Starliner\"", "\"Skylab\"", "\"Briz\"", "\"Colombus\"", "\"Rosetta\"",
- "\"Redstone\"", "\"Antares\"", "\"Philae\"", "\"Prospero\"", "\"Leonardo\"", "\"Parker\"", "\"Dyson\"",
- "\"Oberon\"", "\"DragonFly\"", "\"Energia\"", "\"Buran\"", "\"Urgan\"", "\"Angara\"", "\"Vostok\"",
- "\"Voskhod\"", "\"Shenzhou\"", "\"Ingenuity\"", "\"Oberon\"", "\"Discovery\"", "\"Horizon\"", "\"Visionalis\"",
- "\"Cerasus\"", "\"Progress\"", "\"Unity\"", "\"Surveyor\"", "\"Prospector\"", "\"Ikar\"", "\"Redstone\"",
- "\"Lapis\"", "\"Caesius\"", "\"Iridium\"", "\"Daedlus\"", "\"Aelita\"", "\"Beta\"", "\"Gamma\"",
- "\"Alpha\"", "\"Epsilon\"", "\"Omega\"", "\"Discoverer\"", "\"Explorer\"", "\"Hornet\"", "\"Serenity\"",
- "\"Ariane\"", "\"Hornet\"", "\"Asimov\"", "\"Pegasus\"", "\"Venture\"", "\"Antares\"", "\"Star\"",
- "\"Archimedes\"", "\"Hera\"", "\"Iris\"", "\"Titan\"", "\"Artemis\"", "\"Phoenix\"", "\"Ross\"",
- "\"Sarychev\"", "\"Nemesis\"", "\"Heimdall\"", "\"Sturt\"", "\"Odin\"", "\"Aethelred\"", "\"Vesper\"",
- "\"Aces\"", "\"Argon\"", "\"Olympia\"", "\"Perseus\"", "\"Chyron\"", "\"Proxima\"", "\"Arminus\"",
- "\"Destiny\"", "\"Valient\"", "\"FireFly\"", "\"Obsidian\"", "\"Leviathan\"", "\"Magellan\"", "\"Voyager\"",
- "\"Mariner\"", "\"Joist\"", "\"Crimson\"", "\"Fortune\"", "\"Vanguard\"", "\"Aurora\"", "\"Ulysses\"",
- "\"Crusader\"", "\"Python\"", "\"Kuiper\"", "\"Insurgent\"", "\"Pathfinder\"", "\"Kvant\"", "\"Spektr\"",
- "\"Cassini\"", "\"Zemlya\"", "\"Dawn\"", "\"Kepler\"", "\"Parom\"", "\"Elektron\"", "\"Aeonian\"",
- "\"Node\"", "\"Burya\"", "\"Voyager\"", "\"Ceres\"", "\"Bayern\"", "\"Chasovoy\"", "\"Copernicus\"",
- "\"Quaoar\"", "\"Minotaur\"", "\"Agena\"", "\"Thor\"", "\"Vega\"", "\"Scout\"", "\"Coeus\"", "\"Minerva\"",
- "\"Kratos\"", "\"Neith\"", "\"Omoikane\"", "\"Gayamun\"", "\"Odin\"", "\"Kronos\"", "\"Hope\"", "\"Polet\"",
- "\"Polyot\"", "\"Sputnik\"", "\"Clementine\"", "\"Sojourner\"", "\"Ingenuity\"", "\"Perseverence\"",
- "\"Onatchesko\"", "\"Atlantis\"", "\"Tsyklon\"", "\"Zenit\"", "\"Almaz\"", "\"Soyuz\"", "\"Molniya\"",
- "\"Oreol\"", "\"Yantar\"", "\"Foton\"", "\"Meteor\"", "\"Ekran\"", "\"Strela\"", "\"Bion\"", "\"Piroda\"",
- "\"Salyut\"", "\"Strela\"", "\"Luch\"", "\"Potok\"", "\"Prognoz\"", "\"Orlets\"", "\"Etalon\"", "\"Astron\"",
- "\"Efir\"", "\"Kometa\"", "\"Fram\"", "\"Zemlya\"", "\"Gorizont\"", "\"Arkon\"", "\"Gamma\"", "\"Ekspress\"",
- "\"Gonets\"", "\"Taifun\"", "\"Okean\"", "\"Reflektor\"", "\"Kolibr\"", "\"Sever\"", "\"Comet\"",
- "\"Roton\"", "\"Solaris\"", "\"Altaris\"", "\"Ithacus\"", "\"Dekto\"", "\"Dream\"", "\"Impuls\"",
- "\"Vremya\"", "\"Portal\"", "\"Zodiak\"", "\"Slava\"", "\"Inertsiya\"", "\"Stimuls\"", "\"Ambross\"",
- "\"Amal\"", "\"Thea\"", "\"Orphelia\"", "\"Polyot\"", "\"Mudrost\"", "\"Carrack\"", "\"Artak\"",
- "\"Questar\"", "\"Artyom\"", "\"Tsyclon\"", "\"Ascension\"", "\"Tenacity\"", "\"Contour\"", "\"Zephyr\"",
- "\"Atlanta\"", "\"Polaris\"", "\"Aeolus\"", "\"Mayak\"", "\"Pamir\"", "\"Taimyr\"", "\"Cheget\"", "\"Sirius\"",
- "\"Uragan\"", "\"Agat\"", "\"Skiph\"", "\"Kristall\"", "\"Altair\"", "\"Uran\"", "\"Ingul\"", "\"Carat\"",
- "\"Pulsar\"", "\"Titan\"", "\"Eridanus\"", "\"Parus\"", "\"Cepheus\"", "\"Varagian\"", "\"Olympus\"",
- "\"Tarkhaniy\"", "\"Astraeus\"", "\"Antares\"", "\"Kazbek\"", "\"Burlak\"", "\"Borei\"", "\"Favor\"",
- "\"Rubin\"", "\"Almaz\"", "\"Granit\"", "\"Ruby\"", "\"Sokol\"", "\"Argon\"", "\"Kavkaz\"", "\"Ural\"",
- "\"Berkut\"", "\"Dunay\"", "\"Yastreb\"", "\"Terek\"", "\"Radon\"", "\"Taymyr\"", "\"Pamir\"", "\"Photon\"",
- "\"Elbrus\"", "\"Isayiev\"", "\"Shmel\"", "\"Kobra\"", "\"Shturn\"", "\"Metis\"", "\"Malyutka\"", "\"Fleyta\"",
- "\"Konkurs\"", "\"Bastion\"", "\"Svir\"", "\"Ataka\"", "\"Vodopad\"", "\"Veter\"", "\"Vyuga\"", "\"Vulga\"",
- "\"Tochka\"", "\"Oka\"", "\"Dvina\"", "\"Almaz\"", "\"Araks\"", "\"Kanopus\"", "\"Kliper\"", "\"Kobalt\"",
- "\"Siluet\"", "\"Kondor\"", "\"Lotos\"", "\"Luch\"", "\"Mir\"", "\"Neman\"", "\"Obzor\"", "\"Okean\"",
- "\"Oktan\"", "\"Orlets\"", "\"Poisk\"", "\"Potok\"", "\"Pirs\"", "\"Prognoz\"", "\"Resurs\"", "\"Rodnik\"",
- "\"Romb\"", "\"Kapustin\"", "\"Oplot\"", "\"Tsygan\"", "\"Teplokhod\"", "\"Sokosha\"", "\"Rubezh\"",
- "\"Zircon\"", "\"Moskva\"", "\"Tryol\"", "\"Ustinov\"", "\"Belyayev\"", "\"Novorod\"", "\"Argos\"",
- "\"Nerthus\"", "\"Janus\"", "\"Hephaestus\"", "\"Themis\"", "\"Chronos\"", "\"Tethys\"", "\"Minos\"",
- "\"Autumn\"", "\"Resilience\"", "\"Aelita\"", "\"Rheus\"", "\"Solntspek\"", "\"Spitzer\"", "\"Cartago\"",
- "\"Melibea\"", "\"Spartacus\"", "\"Pulsar\"", "\"Fusion\"", "\"Reliant\"", "\"Thunder\"", "\"Novo\"",
- "\"Panthera\"", "\"Nematoda\"", "\"Anelida\"", "\"Chordata\"", "\"Tetrapoda\"", "\"Cyclero\"", "\"Carrier\"",
- "\"Gaia\"", "\"Irtysh\"", "\"Wyvern\"", "\"Tarsier\"", "\"Alpina\"", "\"Espadon\"", "\"Parlos\"", "\"Nebula\"",
- "\"Lazarus\"", "\"Rufus\"", "\"Dornier\"", "\"Argus\"", "\"Kybau\"", "\"Kalau\"", "\"Chasvoy\"", "\"Zephyr\"",
- "\"Temny\"", "\"Gorizont\"", "\"Yars\"", "\"Krugazor\"", "\"Soprotivlenye\"", "\"Shtil\"", "\"Layner\"",
- "\"Arthropoda\"", "\"Hexapoda\"", "\"Crustacea\"", "\"Tardigrada\"", "\"Mollusca\"", "\"Annelida\"",
- "\"Bryozoa\"", "\"Rotifera", "\"Brachiopoda\"", "\"Echinodermata\"", "\"Hemichordata\"", "\"Cnidaria\"",
- "\"Staurozoa\"", "\"Hydrozoa\"", "\"Porifera", "\"Placozoa\"", "\"Craniata\"", "\"Tunicata\"", "\"Conodonta\"",
- "\"Tetrapoda\"", "\"Amniota\"", "\"Synapsida\"", "\"Sauropsida", "\"Mammalia\"", "\"Sarcodina\"", "\"Aspin\"",
- "\"Sporozoa\"", "\"Ciliata\"", "\"Filosa\"", "\"Toxoplasma\"", "\"Plasmodium\"", "\"Cryptomonada",
- "\"Heterokonta\"", "\"Haptophyta\"", "\"Cercozoa\"", "\"Heliozoa\"", "\"Anapsida\"", "\"Aves\"", "\"Peewee\""};
- String[] engineType = {"Hypergolic", "Cryogenic"};
- String[] thrusterType = {"Monopropellant (Decomposition)", "Monopropellant (Cold Gas)", "Monopropellant (Electric)",
- "Bipropellant (Hypergolic)"};
- String[] spacecraftEra = {"1950s", "1960s", "1970s", "1980s", "1990s", "2000s", "2010s", "2020s", "2030+"};
- String[] powerGen = {"Radioisotope Thermoelectric Generator", "Fuel Cells", "Solar Thermal Panels", "Photovoltaic Panels"};
- String[] attControl = {"Spin stabilization", "Three-axis stabilization", "Reaction wheels", "Attitude Thrusters", "Gyroscopes"};
- String[] orientation = {"StarTracker", "Magnetometer", "Sun Sensor", "Horizon Tracker"};
- String[] missionType = {"Oneway Mission", "Return Mission"};
- String[] orbit = {"Geosynchronous orbit", "Polar orbit", "Precessing orbit", "Sun synchronous orbit", "Molniya orbits"};
- String[] missionLife = {"1-50 days", "50-100 days", "100-500 days", "500-1000 days", "1000-5000 days", "5000 days+"};
- String[] firstPart = {"RD", "RS", "AJ", "XLR", "NK", "RL", "KDTU", "AR", "BE", "MV", "YF", "PKA", "J", "RSA",
- "MJ", "XS", "LM10", "HM", "LE", "LRE", "CE", "DST", "DOK", "KDU", "KRD", "R", "RO", "LMS", "LMP", "RT",
- "F", "E", "A", "B", "S.10", "R", "JDK", "SPP", "TYS", "SOK", "RES", "FWR", "NAA75", "LR", "MA", "GE",
- "OSA", "OBA", "NA", "RM02", "RM", "H", "MBB", "MB", "DF", "DE", "BF", "X", "BW", "BADR", "HS", "DC",
- "UA", "FG", "P", "KMV", "M", "SRMU", "V", "KVD", "JD", "PS", "CE"};
- String[] antennas = {"Low-Gain Antennas", "Medium-Gain Antennas", "High-gain Antennas"};
- System.out.println("Name: " + ass_crack(engine_Name1, firstPart) + '\n');
- String [] M_Types = {"Crewed", "Uncrewed"};
- String M_Type = rand(M_Types);
- String purpose_Chosen = "";
- String spacecraft_Chosen;
- if (M_Type.equals("Crewed")) {
- String[] spacecraftType = {"Spaceplane", "Reentry Capsule"};
- spacecraft_Chosen = rand(spacecraftType);
- if (spacecraft_Chosen.equals("Spaceplane")) {
- String[] purpose = {"Orbiter", "Lander", "Crewed Ferry", "Exploration", "Reconnaissance"};
- purpose_Chosen = rand(purpose);
- } else if (spacecraft_Chosen.equals("Reentry Capsule")) {
- String[] purpose = {"Crewed Exploration"};
- purpose_Chosen = rand(purpose);
- }
- } else {
- String[] spacecraftType = {"Spaceplane", "Semi-Crewed (Space Outpost)", "Orbital Satellite", "Lunar Probe",
- "Planetary Probe", "Deep-Space Probe", "Reentry Capsule", "Space Tug"};
- spacecraft_Chosen = rand(spacecraftType);
- if (spacecraft_Chosen.equals("Spaceplane")) {
- String[] purpose = {"Orbiter", "Lander", "Payload Ferry", "Exploration", "Exploration", "Reconnaissance"};
- purpose_Chosen = rand(purpose);
- } else if (spacecraft_Chosen.equals("Semi-Crewed (Space Outpost)")) {
- String[] purpose = {"Exploration", "Reconnaissance"};
- purpose_Chosen = rand(purpose);
- } else if (spacecraft_Chosen.equals("Orbital Satellite")) {
- String[] purpose = {"Exploration", "Reconnaissance"};
- purpose_Chosen = rand(purpose);
- } else if (spacecraft_Chosen.equals("Lunar Probe") || spacecraft_Chosen.equals("Atmospheric Capsule") || spacecraft_Chosen.equals("Planetary Probe") || spacecraft_Chosen.equals("Deep-Space Probe")) {
- String[] purpose = {"Exploration", "Reconnaissance"};
- purpose_Chosen = rand(purpose);
- } else if (spacecraft_Chosen.equals("Space Tug/Payload Bus")) {
- purpose_Chosen = "Post-Launch Payload Support";
- }
- }
- // Random Generator
- String spacecraft_Era = rand(spacecraftEra);
- String mission_Life = rand(missionLife);
- String engine_Type = rand(engineType);
- String thruster_Type = rand(thrusterType);
- String orbt = rand(orbit);
- String power_Gen = rand(powerGen);
- String att_Control = rand(attControl);
- String mission_Type = rand(missionType);
- String oriention = rand(orientation);
- String antenna = rand(antennas);
- String Type = rand(M_Types);
- //Output
- Output(purpose_Chosen, spacecraft_Chosen, spacecraft_Era, mission_Life, engine_Type, thruster_Type, orbt, power_Gen,
- att_Control, mission_Type ,oriention, antenna, Type);
- System.exit(0);
- } else {
- while (!(repeatCommand.equalsIgnoreCase("Y") && repeatCommand.equalsIgnoreCase("N"))) {
- System.out.println("Wrong input! Please input an appropriate command [Y/N] ot [YES/NO]");
- System.out.print("> ");
- repeatCommand = scanner.next();
- if (repeatCommand.equalsIgnoreCase("Y") || repeatCommand.equalsIgnoreCase("N") || repeatCommand.equalsIgnoreCase("YES") || repeatCommand.equalsIgnoreCase("NO")) {
- break;
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment