Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String [] Cards = new String[49];
- int[] Picked = new int[8];
- String Option;
- int Rand;
- int state;
- int hue;
- Cards[1] = "Zap";
- Cards[2] = "Minions";
- Cards[3] = "Hog Rider";
- Cards[4] = "Elixir Collector";
- Cards[5] = "Fireball";
- Cards[6] = "Cannon";
- Cards[7] = "Goblins";
- Cards[8] = "Spear Goblins";
- Cards[9] = "Valkyrie";
- Cards[10] = "Goblin Hut";
- Cards[11] = "Giant";
- Cards[12] = "Archers";
- Cards[13] = "Bomber";
- Cards[14] = "Musketeer";
- Cards[15] = "Mini P.E.K.K.A";
- Cards[16] = "Witch";
- Cards[17] = "Skeleton Army";
- Cards[18] = "Baby Dragon";
- Cards[19] = "Prince";
- Cards[20] = "Goblin Barrel";
- Cards[21] = "Lightning";
- Cards[22] = "Knight";
- Cards[23] = "Arrows";
- Cards[24] = "Skeletons";
- Cards[25] = "Bomb Tower";
- Cards[26] = "Tombstone";
- Cards[27] = "Balloon";
- Cards[28] = "Giant Skeleton";
- Cards[29] = "Barbarians";
- Cards[30] = "Barbarian Hut";
- Cards[31] = "Rocket";
- Cards[32] = "X-Bow";
- Cards[33] = "Rage";
- Cards[34] = "Minion Horde";
- Cards[35] = "Tesla";
- Cards[36] = "Inferno Tower";
- Cards[37] = "Freeze";
- Cards[38] = "Wizard";
- Cards[39] = "Mirror";
- Cards[40] = "Poison";
- Cards[41] = "Mortar";
- Cards[42] = "Royal Giant";
- Cards[43] = "Three Musketeers";
- Cards[44] = "P.E.K.K.A";
- Cards[45] = "Ice Wizard";
- Cards[46] = "Golem";
- Cards[47] = "Princess";
- Cards[48] = "Dark Prince";
- hue = 0;
- while(hue == 0){
- for (int x = 0; x < 8; x++){//for x = 0; x < 8
- state = 0;
- while(state == 0){ //while state=0
- Rand = (int) (Math.random()*48 + 1);
- for (int y = 0; y < 8; y++){ //for x = 0; x < 8
- if (Rand == Picked[y]){//rand ==picked
- break;
- } // rand ==picked
- if (y == 7){//y==7
- Picked[x] = Rand;
- state = 1;
- }//y==7
- }//for x = 0 ; x <8
- }//while state = 0
- }// for x = 0; x < 8
- panelCards.setVisible(true);
- card1.setText("" +Cards[Picked[0]]);
- card2.setText("" +Cards[Picked[1]]);
- card3.setText("" +Cards[Picked[2]]);
- card4.setText("" +Cards[Picked[3]]);
- card5.setText("" +Cards[Picked[4]]);
- card6.setText("" +Cards[Picked[5]]);
- card7.setText("" +Cards[Picked[6]]);
- card8.setText("" +Cards[Picked[7]]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement