SHARE
TWEET

ConLasChangeCardsTester

a guest Oct 18th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package nana;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Java_Deck_Tester
  6. {
  7.     public static void main(String[] args) {
  8.  
  9.          // Names initialized here. Here you have to make the player objects using substring and idk what else.
  10.         String tname1 = "Team Queso";
  11.         String tname2 = "Complexity";
  12.         String nname1 = "Cuchii cuu";
  13.         String nname2 = "Coltonw83";
  14.        
  15.        
  16.       //Teamname abbreviation
  17.         int test = tname1.indexOf("T");
  18.         int test2 = tname1.indexOf("Q");
  19.         String abbrev1 = tname1.substring(test, test+1) +
  20.         tname1.substring(test2, test2+1); //contains TQ
  21.        
  22.         int test3 = tname2.indexOf("om");
  23.         String temp = tname2.substring(test3-1, test3+1);
  24.         String abbrev2 = temp.toUpperCase(); //contains CO
  25.        
  26.         //Nickname
  27.         int length1 = nname1.length()-1; //9
  28.         int length2 = nname2.length()-1; //8
  29.         int zero = nname1.indexOf("C"); //0
  30.         String cuchii = nname1.substring(0,6); //contains Cuchii
  31.         String coltonw = nname2.substring(0,7); //contains Coltonw
  32.        
  33.         //final nickname
  34.         String fin1 = abbrev1 + "-" + cuchii + length1 + zero;
  35.         String fin2 = abbrev2 + "-" + coltonw + length2 + zero;
  36.        
  37.         System.out.println("Jugador #1: " + fin1 + "\n" +
  38.         "Jugador #2: " + fin2 + "\n");
  39.        
  40.         //Changes the lowest damage card and the lowest health card for each tea,
  41.         int MLGLowHealth = 800;
  42.         int MLGCLowDamage = 160;
  43.         int MLGLow2Health = 0;
  44.         int MLGLow2Damage = 240;
  45.         int QuesoLowHealth = 0;
  46.         int QuesoLowDamage = 159;
  47.         int QuesoLow2Health = 0;
  48.         int QuesoLow2Damage = 700;
  49.        
  50.         // Initialize decks (pretty simple)
  51.         Java_Deck deck1 = new Java_Deck("deck1", "", "", "Baby dragon", "Epic", 4, 1064, 133 );
  52.         Java_Deck deck2 = new Java_Deck("deck2","", "", "Bats", "Common", 2, 67, 67);
  53.         Java_Deck deck3 = new Java_Deck("deck3","", "", "Elixir Golem", "Rare", 3, 1408, 211);
  54.         Java_Deck deck4 = new Java_Deck("deck4","", "", "Baby dragon", "Epic", 4, 1064, 133);
  55.  
  56.         // Add every GOD DARN CARD TO EVERY DECK (this took way too much time)
  57.         deck1.addCard("Electro Wizard", "Legendary", 590, 4, 192);
  58.         deck1.addCard("Elixir Golem", "Rare", 1408, 3, 211);
  59.         deck1.addCard("Fisherman", "Legendary", 800, 3, 160);
  60.         deck1.addCard("Night Witch", "Legendary", 750, 4, 260);
  61.         deck1.addCard("Poison", "Rare", 0, 4, 700);
  62.         deck1.addCard("Sparky", "Legendary", 1200, 6, 1100);
  63.         deck1.addCard("The Log", "Legendary", 0, 2, 240);
  64.         deck2.addCard("Electro Wizard", "Legendary", 590, 4, 192);
  65.         deck2.addCard("Inferno Tower", "Rare", 1452, 5, 35);
  66.         deck2.addCard("Miner", "Legendary", 1000, 3, 160);
  67.         deck2.addCard("Miner", "Legendary", 1000, 3, 160);
  68.         deck2.addCard("Poison", "Rare", 0, 4, 700);
  69.         deck2.addCard("The Log", "Legendary", 0, 2, 240);
  70.         deck2.addCard("Valkyrie", "Rare", 1654, 4, 221);
  71.         deck2.addCard("Wall Breakers", "Rare", 275, 2, 400);
  72.         deck3.addCard("Fisherman", "Legendary", 800, 3, 160);
  73.         deck3.addCard("Mega Minion", "Rare", 695, 3, 258);
  74.         deck3.addCard("Miner", "Legendary", 1000, 3, 160);
  75.         deck3.addCard("Night Witch", "Legendary", 750, 4, 260);
  76.         deck3.addCard("Poison", "Rare", 0, 4, 700);
  77.         deck3.addCard("The Log", "Legendary", 0, 2, 240);
  78.         deck3.addCard("Witch", "Epic", 692, 5, 220);
  79.         deck4.addCard("Battle Ram", "Rare", 756, 4, 220);
  80.         deck4.addCard("Electro Wizard", "Legendary", 590, 4, 192);
  81.         deck4.addCard("Fisherman", "Legendary", 800, 3, 160);
  82.         deck4.addCard("P.E.K.K.A", "Epic", 3125, 7, 678);
  83.         deck4.addCard("Poison", "Rare", 0, 4, 700);
  84.         deck4.addCard("Royal Ghost", "Legendary", 1000, 3, 216);
  85.         deck4.addCard("Zap", "Common", 0, 2, 159);
  86.  
  87.         // Print damage and health of every deck
  88.         System.out.println(deck1.printDamage());
  89.         System.out.println(deck2.printDamage());
  90.         System.out.println(deck3.printDamage());
  91.         System.out.println(deck4.printDamage());
  92.         System.out.println(deck1.printHealth());
  93.         System.out.println(deck2.printHealth());
  94.         System.out.println(deck3.printHealth());
  95.         System.out.println(deck4.printHealth());
  96.  
  97.         // Do Colton and Cuchii methods. Only have to do it once (also, you have to replace the names for the player objects and the teams for the actual teams.
  98.         deck1.Colton_choice("Marcos", "Queso", deck1, deck2, deck3, deck4);
  99.         deck1.Cuchii_choice("Diego", "MLG", deck1, deck2, deck3, deck4);
  100.  
  101.         // Print the decks, ez pz we got a 100
  102.         System.out.println(deck1);
  103.         System.out.println(deck2);
  104.         System.out.println(deck3);
  105.         System.out.println(deck4);
  106.        
  107.         //Asks for the card they wanna change
  108.         Scanner scan = new Scanner(System.in);
  109.         System.out.println("MLG, what is the damage new cards?");
  110.         int dam1 = scan.nextInt();
  111.         int dam2 = scan.nextInt();
  112.         System.out.println("MLG, what is the health new cards?");
  113.         int health1 = scan.nextInt();
  114.         int health2 = scan.nextInt();
  115.         System.out.println("TQ, what is the damage of the new cards?");
  116.         int dam3 = scan.nextInt();
  117.         int dam4= scan.nextInt();
  118.         System.out.println("TQ, what is the health of the new cards?");
  119.         int health3 = scan.nextInt();
  120.         int health4 = scan.nextInt();
  121.         deck1.addCard("", "", health1, 0, dam1);
  122.         deck1.addCard("", "", health2, 0, dam2);
  123.         deck4.addCard("", "", health3, 0, dam3);
  124.         deck4.addCard("", "", health4, 0, dam4);
  125.         deck1.changeCards(MLGLowHealth, MLGCLowDamage, MLGLow2Health, MLGLow2Damage);
  126.         deck4.changeCards(QuesoLowHealth, QuesoLowDamage, QuesoLow2Health, QuesoLow2Damage);
  127.         System.out.println(deck1.printDamage());
  128.         System.out.println(deck4.printDamage());
  129.         System.out.println(deck1.printHealth());
  130.         System.out.println(deck4.printHealth());
  131.        
  132.     }
  133. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top