Unverified Commit 9fdd9398 authored by Mathieu Féry (Mathius)'s avatar Mathieu Féry (Mathius)
Browse files

Rework Structuration of name static declaration and add Weird names

parent 7fef3024
package fr.iutnantes.miar.dndgenerator.api.donjon.bin.sh;
package fr.iutnantes.miar.dndgenerator.api.donjon.bin.sh;
import android.content.Context;
import android.util.Log;
......@@ -256,6 +256,16 @@ public class Name implements Serializable {
return createAllCombination(species, Arrays.asList(types));
}
/**
* Method for create all combination related to species and types given in argument
* @param specie specie used for creates names
* @param types Types used for creates names
* @return names
*/
public static List<Name> createAllCombination(String specie, List<String> types) {
return createAllCombination(Collections.singletonList(specie), types);
}
/**
* Method for create all combination related to species given in argument
* @param species List of Species used for creates names
......@@ -270,64 +280,151 @@ public class Name implements Serializable {
return out;
}
public static final String maleType = "Male";
public static final String femaleType = "Female";
public static final String townType = "Town";
public static final String elementalType = "Elemental";
public static final String specificLocationType = "Location";
public static final String castleType = "Castle";
public static final List<String> genderTypes = Arrays.asList(maleType, femaleType);
public static final List<String> townAndCastleTypes = Arrays.asList(townType, castleType);
// Constant Definition
// Gender Definition
public static final String male = "Male";
public static final String female = "Female";
// Location Definition
public static final String location = "Location";
public static final String town = "Town";
public static final String castle = "Castle";
public static final String kingdom = "Kingdom";
public static final String dungeon = "Dungeon";
public static final String geography = "Geography";
public static final String planar = "Planar";
public static final String ward = "Ward";
public static final String street = "Street";
public static final String inn = "Inn";
// Species Definition
public static final String human = "Human";
public static final String dwarvish = "Dwarvish";
public static final String elvish = "Elvish";
public static final String halfling = "Halfling";
public static final String draconic = "Draconic";
public static final String drow = "Drow";
public static final String orcish = "Orcish";
public static final String celestial = "Celestial";
public static final String fiendish = "Fiendish";
public static final String modron = "Modron";
public static final String elemental = "Elemental";
public static final String eldritch = "Eldritch";
// Element Definition
public static final String air = "Air";
public static final String earth = "Earth";
public static final String fire = "Fire";
public static final String water = "Water";
// Event Definition
public static final String party = "Party";
public static final String ship = "Ship";
public static final String deity = "Deity";
public static final String festival = "Festival";
public static final String blasphemy = "Blasphemy";
public static final String war = "War";
// Item Definition
public static final String tome = "Tome";
public static final String weapon = "Weapon";
public static final String mythos = "Mythos";
// Country Definition
public static final String babylonian = "Babylonian";
public static final String celtic = "Celtic";
public static final String egyptian = "Egyptian";
public static final String greek = "Greek";
public static final String roman = "Roman";
public static final String sumerian = "Sumerian";
public static final String english = "English";
public static final String french = "French";
public static final String german = "German";
public static final String italian = "Italian";
public static final String norse = "Norse";
public static final String saxon = "Saxon";
public static final String slavic = "Slavic";
public static final String spanish = "Spanish";
public static final String arabic = "Arabic";
public static final String chinese = "Chinese";
public static final String hebrew = "Hebrew";
public static final String hindu = "Hindu";
public static final String mongolian = "Mongolian";
public static final String persian = "Persian";
public static final String japanese = "Japanese";
public static final String congolese = "Congolese";
public static final String ethiopian = "Ethiopian";
public static final String malian = "Malian";
public static final String algonquin = "Algonquin";
public static final String aztec = "Aztec";
public static final String inkan = "Inkan";
public static final String inuit = "Inuit";
public static final String navajo = "Navajo";
public static final String sioux = "Sioux";
// Class Definition
public static final String investigator = "Investigator";
// Group of Constants
public static final List<String> genders = Arrays.asList(male, female);
public static final List<String> townAndCastle = Arrays.asList(town, castle);
// Group for each type of endpoint
public static final List<String> commonFantasySpecies = Arrays.asList(
"Human", "Dwarvish", "Elvish", "Halfling");
human, dwarvish, elvish, halfling);
public static final List<String> monstrousFantasySpecies = Arrays.asList(
"Draconic", "Drow", "Orcish");
draconic, drow, orcish);
public static final List<String> outsiderFantasySpecies = Arrays.asList(
"Celestial", "Fiendish", "Modron");
celestial, fiendish, modron);
public static final List<String> elementalFantasySpecies = Arrays.asList(
"Air", "Earth", "Fire", "Water");
air, earth, fire, water);
public static final List<String> fantasySettingsEntity = Arrays.asList(
"Party", "Ship", "Deity");
party, ship, deity);
public static final List<String> fantasySettingsEvent = Arrays.asList(
"Festival", "Blasphemy", "War");
festival, blasphemy, war);
public static final List<String> fantasySettingsItem = Arrays.asList(
"Tome", "Weapon");
tome, weapon);
public static final List<String> fantasySettingsBaseLocation = Arrays.asList(
"Kingdom", "Castle", "Dungeon", "Geography");
kingdom, castle, dungeon, geography);
public static final List<String> fantasySettingsSpecificLocation = Collections.singletonList(
"Planar");
planar);
public static final List<String> fantasySettingsTown = Arrays.asList(
"Town", "Ward", "Street", "Inn");
town, ward, street, inn);
public static final List<String> ancientWorldPeople = Arrays.asList(
"Babylonian", "Celtic", "Egyptian", "Greek", "Roman", "Sumerian");
babylonian, celtic, egyptian, greek, roman, sumerian);
public static final List<String> medievalPeople = Arrays.asList(
"English", "French", "German", "Italian", "Norse", "Saxon", "Slavic", "Spanish");
english, french, german, italian, norse, saxon, slavic, spanish);
public static final List<String> baseAsiaticPeople = Arrays.asList(
"Arabic", "Chinese", "Hebrew", "Hindu", "Mongolian", "Persian");
arabic, chinese, hebrew, hindu, mongolian, persian);
public static final List<String> specificAsiaticPeople = Collections.singletonList(
"Japanese");
japanese);
public static final List<String> africaPeople = Arrays.asList(
"Congolese", "Egyptian", "Ethiopian", "Malian");
congolese, egyptian, ethiopian, malian);
public static final List<String> newWorldPeople = Arrays.asList(
"Algonquin", "Aztec", "Inkan", "Inuit", "Navajo", "Sioux");
algonquin, aztec, inkan, inuit, navajo, sioux);
public static final List<String> cthulhuPeople = Arrays.asList(
arabic, aztec, chinese, egyptian, sumerian);
// Definition of NameGenerator associated
public static final List<Name> commonFantasyNamesOnly = createAllCombination(
commonFantasySpecies, genderTypes);
commonFantasySpecies, genders);
public static final List<Name> commonFantasyNames = joinList(Arrays.asList(
commonFantasyNamesOnly, createAllCombination(commonFantasySpecies, townType)));
commonFantasyNamesOnly, createAllCombination(commonFantasySpecies, town)));
public static final List<Name> monstrousFantasyNamesOnly = createAllCombination(
monstrousFantasySpecies, genderTypes);
monstrousFantasySpecies, genders);
public static final List<Name> monstrousFantasyNames = joinList(Arrays.asList(
monstrousFantasyNamesOnly, createAllCombination(monstrousFantasySpecies, townType)));
monstrousFantasyNamesOnly, createAllCombination(monstrousFantasySpecies, town)));
public static final List<Name> outsiderFantasyNames = createAllCombination(
outsiderFantasySpecies);
public static final List<Name> elementalFantasyNames = createAllCombination(
elementalFantasySpecies, elementalType);
elementalFantasySpecies, elemental);
public static final List<Name> entityFantasyNames = createAllCombination(fantasySettingsEntity);
public static final List<Name> eventFantasyNames = createAllCombination(fantasySettingsEvent);
public static final List<Name> itemFantasyNames = createAllCombination(fantasySettingsItem);
public static final List<Name> locationFantasyNames = joinList(Arrays.asList(
createAllCombination(fantasySettingsBaseLocation),
createAllCombination(fantasySettingsSpecificLocation, specificLocationType)));
createAllCombination(fantasySettingsSpecificLocation, location)));
public static final List<Name> townFantasyNames = createAllCombination(fantasySettingsTown);
public static final List<Name> allPeopleFantasyNames = joinList(Arrays.asList(
commonFantasyNamesOnly, monstrousFantasyNamesOnly, outsiderFantasyNames,
......@@ -337,36 +434,48 @@ public class Name implements Serializable {
entityFantasyNames, eventFantasyNames, itemFantasyNames, locationFantasyNames,
townFantasyNames));
public static final List<Name> ancientWorldPeopleNamesOnly = createAllCombination(
ancientWorldPeople, genderTypes);
ancientWorldPeople, genders);
public static final List<Name> ancientWorldPeopleNames = joinList(Arrays.asList(
ancientWorldPeopleNamesOnly, createAllCombination(ancientWorldPeople, townType)));
ancientWorldPeopleNamesOnly, createAllCombination(ancientWorldPeople, town)));
public static final List<Name> medievalPeopleNamesOnly = createAllCombination(
medievalPeople, genderTypes);
medievalPeople, genders);
public static final List<Name> medievalPeopleNames = joinList(Arrays.asList(
medievalPeopleNamesOnly, createAllCombination(medievalPeople, townType)));
medievalPeopleNamesOnly, createAllCombination(medievalPeople, town)));
public static final List<Name> asiaticPeopleNamesOnly = createAllCombination(
joinList(Arrays.asList(baseAsiaticPeople, specificAsiaticPeople)), genderTypes);
joinList(Arrays.asList(baseAsiaticPeople, specificAsiaticPeople)), genders);
public static final List<Name> asiaticPeopleNames = joinList(Arrays.asList(
asiaticPeopleNamesOnly, createAllCombination(baseAsiaticPeople, townType),
createAllCombination(specificAsiaticPeople, townAndCastleTypes)));
asiaticPeopleNamesOnly, createAllCombination(baseAsiaticPeople, town),
createAllCombination(specificAsiaticPeople, townAndCastle)));
public static final List<Name> africaPeopleNamesOnly = createAllCombination(
africaPeople, genderTypes);
africaPeople, genders);
public static final List<Name> africaPeopleNames = joinList(Arrays.asList(
africaPeopleNamesOnly, createAllCombination(africaPeople, townType)));
africaPeopleNamesOnly, createAllCombination(africaPeople, town)));
public static final List<Name> newWorldPeopleNamesOnly = createAllCombination(
newWorldPeople, genderTypes);
newWorldPeople, genders);
public static final List<Name> newWorldPeopleNames = joinList(Arrays.asList(
newWorldPeopleNamesOnly, createAllCombination(newWorldPeople, townType)));
newWorldPeopleNamesOnly, createAllCombination(newWorldPeople, town)));
public static final List<Name> allQuasiHistoricalPeopleNames = joinList(Arrays.asList(
ancientWorldPeopleNamesOnly, medievalPeopleNamesOnly, asiaticPeopleNamesOnly,
newWorldPeopleNamesOnly));
public static final List<Name> allQuasiHistoricalNames = joinList(Arrays.asList(
ancientWorldPeopleNames, medievalPeopleNames, asiaticPeopleNames, africaPeopleNames,
newWorldPeopleNames));
public static final List<Name> cthulhuCaracterNames = createAllCombination(
investigator, genders);
public static final List<Name> cthulhuEldritchNames = createAllCombination(
eldritch);
public static final List<Name> cthulhuTomesNames = createAllCombination(
mythos, Collections.singletonList(tome));
public static final List<Name> cthulhuPeopleNames = joinList(Arrays.asList(cthulhuCaracterNames,
cthulhuEldritchNames));
public static final List<Name> cthulhuNames = joinList(Arrays.asList(cthulhuPeopleNames,
cthulhuTomesNames));
public static final List<Name> cthulhuExtendedNames = joinList(Arrays.asList(cthulhuNames,
createAllCombination(cthulhuPeople, genders)));
public static final List<Name> allPeopleNames = joinList(Arrays.asList(allPeopleFantasyNames,
allQuasiHistoricalPeopleNames));
allQuasiHistoricalPeopleNames, cthulhuPeopleNames));
public static final List<Name> allNames = joinList(Arrays.asList(allFantasyNames,
allQuasiHistoricalNames));
allQuasiHistoricalNames, cthulhuNames));
public static final Name defaultName = commonFantasyNames.get(0);
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment