Advertisement
Guest User

Untitled

a guest
Feb 5th, 2023
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. int resultado[11][21];
  2.  
  3. const char * hero_position[] = {
  4. "Chabba",
  5. "Aurora",
  6. "Cleaver",
  7. "Corvus",
  8. "Luther",
  9. "Ziri",
  10. "Rufus",
  11. "Astaroth",
  12. "Kayla",
  13. "Galahad",
  14. "Tristan",
  15. "Ishmael",
  16. "K'arkh",
  17. "Markus",
  18. "Andvari",
  19. "Yasmine",
  20. "Elmir",
  21. "Qing Mao",
  22. "Satori",
  23. "Alvanor",
  24. "Maya",
  25. "Arachne",
  26. "Dante",
  27. "Krista",
  28. "Keira",
  29. "Judge",
  30. "Morrigan",
  31. "Celeste",
  32. "Amira",
  33. "Kai",
  34. "Isaac",
  35. "Jhu",
  36. "Nebula",
  37. "Sebastian",
  38. "Mojo",
  39. "Heidi",
  40. "Jorgen",
  41. "Orion",
  42. "Ginger",
  43. "Daredevil",
  44. "Darkstar",
  45. "Lars",
  46. "Astrid & Lucas",
  47. "Aidan",
  48. "Iris",
  49. "Cornelius",
  50. "Faceless",
  51. "Fox",
  52. "Lian",
  53. "Phobos",
  54. "Artemis",
  55. "Dorian",
  56. "Peppy",
  57. "Jet",
  58. "Thea",
  59. "Fafnir",
  60. "Helios",
  61. "Lilith",
  62. "Martha",
  63. "Fenrir",
  64. "Oliver",
  65. "Cain",
  66. "Albus",
  67. "Axel",
  68. "Merlin",
  69. "Mara",
  70. "Biscuit",
  71. "Khorus"
  72. };
  73.  
  74. const char * formacao[11] = {"Khorus", "Dante", "Cain", "Astrid & Lucas", "Oliver", "Martha", "Axel", "Orion", "Merlin", "Keira", "Fenrir"};
  75. int formacao_num[11] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  76. const int hero_position_size = sizeof(hero_position) / sizeof(hero_position[0]);
  77.  
  78. int localizar_posicao(const char * nome) {
  79. for (unsigned int i = 0; i < hero_position_size; i++) {
  80. if (hero_position[i] == nome) {
  81. return i;
  82. }
  83. }
  84. return -1;
  85. }
  86.  
  87. void setup() {
  88. Serial.begin(9600);
  89. converter();
  90. impressao();
  91. Serial.println("");
  92. Serial.println(hero_position[3]);
  93. }
  94.  
  95. void converter() {
  96. for (byte i = 0; i < 11; i++) {
  97. formacao_num[i] = localizar_posicao(formacao[i]);
  98. Serial.println(formacao_num[i]);
  99. }
  100. }
  101.  
  102. void impressao() {
  103. for (int i = 0; i < 11; i++) {
  104. if ((i % 2) != 0.00) {
  105. Serial.print(formacao_num[i]);
  106. }
  107. else {
  108. Serial.print("(");
  109. if (i == 0) Serial.print("MainPet: ");
  110. Serial.print(formacao_num[i]);
  111. Serial.print(")");
  112. if (i != 10) Serial.print(" - ");
  113. }
  114. }
  115. }
  116.  
  117. void loop() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement