Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int resultado[11][21];
- const char * hero_position[] = {
- "Chabba",
- "Aurora",
- "Cleaver",
- "Corvus",
- "Luther",
- "Ziri",
- "Rufus",
- "Astaroth",
- "Kayla",
- "Galahad",
- "Tristan",
- "Ishmael",
- "K'arkh",
- "Markus",
- "Andvari",
- "Yasmine",
- "Elmir",
- "Qing Mao",
- "Satori",
- "Alvanor",
- "Maya",
- "Arachne",
- "Dante",
- "Krista",
- "Keira",
- "Judge",
- "Morrigan",
- "Celeste",
- "Amira",
- "Kai",
- "Isaac",
- "Jhu",
- "Nebula",
- "Sebastian",
- "Mojo",
- "Heidi",
- "Jorgen",
- "Orion",
- "Ginger",
- "Daredevil",
- "Darkstar",
- "Lars",
- "Astrid & Lucas",
- "Aidan",
- "Iris",
- "Cornelius",
- "Faceless",
- "Fox",
- "Lian",
- "Phobos",
- "Artemis",
- "Dorian",
- "Peppy",
- "Jet",
- "Thea",
- "Fafnir",
- "Helios",
- "Lilith",
- "Martha",
- "Fenrir",
- "Oliver",
- "Cain",
- "Albus",
- "Axel",
- "Merlin",
- "Mara",
- "Biscuit",
- "Khorus"
- };
- const char * formacao[11] = {"Khorus", "Dante", "Cain", "Astrid & Lucas", "Oliver", "Martha", "Axel", "Orion", "Merlin", "Keira", "Fenrir"};
- int formacao_num[11] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- const int hero_position_size = sizeof(hero_position) / sizeof(hero_position[0]);
- int localizar_posicao(const char * nome) {
- for (unsigned int i = 0; i < hero_position_size; i++) {
- if (hero_position[i] == nome) {
- return i;
- }
- }
- return -1;
- }
- void setup() {
- Serial.begin(9600);
- converter();
- impressao();
- Serial.println("");
- Serial.println(hero_position[3]);
- }
- void converter() {
- for (byte i = 0; i < 11; i++) {
- formacao_num[i] = localizar_posicao(formacao[i]);
- Serial.println(formacao_num[i]);
- }
- }
- void impressao() {
- for (int i = 0; i < 11; i++) {
- if ((i % 2) != 0.00) {
- Serial.print(formacao_num[i]);
- }
- else {
- Serial.print("(");
- if (i == 0) Serial.print("MainPet: ");
- Serial.print(formacao_num[i]);
- Serial.print(")");
- if (i != 10) Serial.print(" - ");
- }
- }
- }
- void loop() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement