Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package nana;
- import java.util.Scanner;
- public class Java_Deck_Tester
- {
- public static void main(String[] args) {
- // Names initialized here. Here you have to make the player objects using substring and idk what else.
- String tname1 = "Team Queso";
- String tname2 = "Complexity";
- String nname1 = "Cuchii cuu";
- String nname2 = "Coltonw83";
- //Teamname abbreviation
- int test = tname1.indexOf("T");
- int test2 = tname1.indexOf("Q");
- String abbrev1 = tname1.substring(test, test+1) +
- tname1.substring(test2, test2+1); //contains TQ
- int test3 = tname2.indexOf("om");
- String temp = tname2.substring(test3-1, test3+1);
- String abbrev2 = temp.toUpperCase(); //contains CO
- //Nickname
- int length1 = nname1.length()-1; //9
- int length2 = nname2.length()-1; //8
- int zero = nname1.indexOf("C"); //0
- String cuchii = nname1.substring(0,6); //contains Cuchii
- String coltonw = nname2.substring(0,7); //contains Coltonw
- //final nickname
- String fin1 = abbrev1 + "-" + cuchii + length1 + zero;
- String fin2 = abbrev2 + "-" + coltonw + length2 + zero;
- System.out.println("Jugador #1: " + fin1 + "\n" +
- "Jugador #2: " + fin2 + "\n");
- //Changes the lowest damage card and the lowest health card for each tea,
- int MLGLowHealth = 800;
- int MLGCLowDamage = 160;
- int MLGLow2Health = 0;
- int MLGLow2Damage = 240;
- int QuesoLowHealth = 0;
- int QuesoLowDamage = 159;
- int QuesoLow2Health = 0;
- int QuesoLow2Damage = 700;
- // Initialize decks (pretty simple)
- Java_Deck deck1 = new Java_Deck("deck1", "", "", "Baby dragon", "Epic", 4, 1064, 133 );
- Java_Deck deck2 = new Java_Deck("deck2","", "", "Bats", "Common", 2, 67, 67);
- Java_Deck deck3 = new Java_Deck("deck3","", "", "Elixir Golem", "Rare", 3, 1408, 211);
- Java_Deck deck4 = new Java_Deck("deck4","", "", "Baby dragon", "Epic", 4, 1064, 133);
- // Add every GOD DARN CARD TO EVERY DECK (this took way too much time)
- deck1.addCard("Electro Wizard", "Legendary", 590, 4, 192);
- deck1.addCard("Elixir Golem", "Rare", 1408, 3, 211);
- deck1.addCard("Fisherman", "Legendary", 800, 3, 160);
- deck1.addCard("Night Witch", "Legendary", 750, 4, 260);
- deck1.addCard("Poison", "Rare", 0, 4, 700);
- deck1.addCard("Sparky", "Legendary", 1200, 6, 1100);
- deck1.addCard("The Log", "Legendary", 0, 2, 240);
- deck2.addCard("Electro Wizard", "Legendary", 590, 4, 192);
- deck2.addCard("Inferno Tower", "Rare", 1452, 5, 35);
- deck2.addCard("Miner", "Legendary", 1000, 3, 160);
- deck2.addCard("Miner", "Legendary", 1000, 3, 160);
- deck2.addCard("Poison", "Rare", 0, 4, 700);
- deck2.addCard("The Log", "Legendary", 0, 2, 240);
- deck2.addCard("Valkyrie", "Rare", 1654, 4, 221);
- deck2.addCard("Wall Breakers", "Rare", 275, 2, 400);
- deck3.addCard("Fisherman", "Legendary", 800, 3, 160);
- deck3.addCard("Mega Minion", "Rare", 695, 3, 258);
- deck3.addCard("Miner", "Legendary", 1000, 3, 160);
- deck3.addCard("Night Witch", "Legendary", 750, 4, 260);
- deck3.addCard("Poison", "Rare", 0, 4, 700);
- deck3.addCard("The Log", "Legendary", 0, 2, 240);
- deck3.addCard("Witch", "Epic", 692, 5, 220);
- deck4.addCard("Battle Ram", "Rare", 756, 4, 220);
- deck4.addCard("Electro Wizard", "Legendary", 590, 4, 192);
- deck4.addCard("Fisherman", "Legendary", 800, 3, 160);
- deck4.addCard("P.E.K.K.A", "Epic", 3125, 7, 678);
- deck4.addCard("Poison", "Rare", 0, 4, 700);
- deck4.addCard("Royal Ghost", "Legendary", 1000, 3, 216);
- deck4.addCard("Zap", "Common", 0, 2, 159);
- // Print damage and health of every deck
- System.out.println(deck1.printDamage());
- System.out.println(deck2.printDamage());
- System.out.println(deck3.printDamage());
- System.out.println(deck4.printDamage());
- System.out.println(deck1.printHealth());
- System.out.println(deck2.printHealth());
- System.out.println(deck3.printHealth());
- System.out.println(deck4.printHealth());
- // 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.
- deck1.Colton_choice("Marcos", "Queso", deck1, deck2, deck3, deck4);
- deck1.Cuchii_choice("Diego", "MLG", deck1, deck2, deck3, deck4);
- // Print the decks, ez pz we got a 100
- System.out.println(deck1);
- System.out.println(deck2);
- System.out.println(deck3);
- System.out.println(deck4);
- //Asks for the card they wanna change
- Scanner scan = new Scanner(System.in);
- System.out.println("MLG, what is the damage new cards?");
- int dam1 = scan.nextInt();
- int dam2 = scan.nextInt();
- System.out.println("MLG, what is the health new cards?");
- int health1 = scan.nextInt();
- int health2 = scan.nextInt();
- System.out.println("TQ, what is the damage of the new cards?");
- int dam3 = scan.nextInt();
- int dam4= scan.nextInt();
- System.out.println("TQ, what is the health of the new cards?");
- int health3 = scan.nextInt();
- int health4 = scan.nextInt();
- deck1.addCard("", "", health1, 0, dam1);
- deck1.addCard("", "", health2, 0, dam2);
- deck4.addCard("", "", health3, 0, dam3);
- deck4.addCard("", "", health4, 0, dam4);
- deck1.changeCards(MLGLowHealth, MLGCLowDamage, MLGLow2Health, MLGLow2Damage);
- deck4.changeCards(QuesoLowHealth, QuesoLowDamage, QuesoLow2Health, QuesoLow2Damage);
- System.out.println(deck1.printDamage());
- System.out.println(deck4.printDamage());
- System.out.println(deck1.printHealth());
- System.out.println(deck4.printHealth());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement