Advertisement
Guest User

Untitled

a guest
Dec 14th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1.  public void resetDeck() {
  2.       String c = "";
  3.       String d = "";
  4.       int e = 0;
  5.       for(int a = 0; a < 8; a++) {
  6.           if(a == 0) {
  7.               c = "A";
  8.           }
  9.           else if(a == 1) {
  10.               c = "7";
  11.           }
  12.           else if(a == 2) {
  13.               c = "8";
  14.           }
  15.           else if(a == 3) {
  16.               c = "9";
  17.           }
  18.           else if(a == 4) {
  19.               c = "10";
  20.           }
  21.           else if(a == 5) {
  22.               c = "J";
  23.           }
  24.           else if(a == 6) {
  25.               c = "D";
  26.           }
  27.           else if(a == 7) {
  28.               c = "K";
  29.           }
  30.           for(int b = 0; b < 4; b++) {
  31.               if(b == 0) {
  32.                   d = "Pik";
  33.               }
  34.               else if(b == 1) {
  35.                   d = "Kreuz";
  36.               }
  37.               else if(b == 2) {
  38.                   d = "Karo";
  39.               }
  40.               else {
  41.                   d = "Herz";
  42.               }
  43.               Karte karte = new Karte(d, c);
  44.               kartendeck[e] = karte;
  45.               e++;
  46.           }
  47.          
  48.       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement