Advertisement
Guest User

me2

a guest
Oct 6th, 2015
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. public class CardDrive
  2. {
  3. public static void main( String[] args )
  4. {
  5. int randomcard = (int) (Math.random()*10)+1;
  6. // int randomLetter = (int) Math.random()*3;
  7. CardClass[] myHand = new CardClass[4];
  8. CardClass blackcard = new CardClass();
  9. myHand[0] = blackcard;
  10. CardClass numbercard = new CardClass(randomcard, "Hearts" , "A");
  11. myHand[1] = numbercard;
  12. CardClass facecard = new CardClass(randomcard, "Diamonds" , "J");
  13. myHand[2] = facecard;
  14. for(int index = 0; index < myHand.length; index++)
  15. {
  16. System.out.println(myHand[index]);
  17.  
  18.  
  19.  
  20. } // end for
  21. } // end main method
  22. } // end class CardDrive
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement