Advertisement
yusufmukharom

main.java rand card

Oct 23rd, 2019
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import java.util.*;
  2. public class Main {
  3. Scanner s = new Scanner(System.in);
  4. public int GetInput(){
  5. System.out.println("How many cards would you like to draw?");
  6. String p = s.nextLine();
  7. int y = Integer.parseInt(p);
  8. return y;
  9. }
  10.  
  11. public static void main(String[] args) {
  12. Deck d = new Deck();
  13.  
  14. Card C;
  15.  
  16. while (d.getTotalCards()!= 0 ){
  17. C = d.drawFromDeck();
  18. System.out.println( C.toString() );
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement