bwong23's Profile User Rating: -----

Reputation: -1 Dishonored
Group:
Members
Active Posts:
29 (0.05 per day)
Joined:
14-January 13
Profile Views:
559
Last Active:
User is offline Jan 17 2013 10:23 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   bwong23 has not set their status

Posts I've Made

  1. In Topic: Deck of Cards Applet how to shuffle and display

    Posted 17 Jan 2013

    Totally understandable. Partially because this online class is far from comprehensive and it was developed in 1999 so a lot of stuff you use is new to me. But thanks again for the help you have very generously provided me.
  2. In Topic: Deck of Cards Applet how to shuffle and display

    Posted 17 Jan 2013

    Haha fair enough. If I don't turn this assignment in by tomorrow I will have to pay a $500 extension fee and thought professional programmers like you guys would have no problem figuring this out. I just need to get the course done and am going to retake this class in college, but I understand. Thanks for the help you have provided however.
  3. In Topic: Deck of Cards Applet how to shuffle and display

    Posted 17 Jan 2013

    View Postpbl, on 17 January 2013 - 07:13 AM, said:

    If your Card are in an ArrayList<Card> no need to shuffle just write a method that return a hand:

       ArrayList<Card> al;
       Random ran = new Random();
    
       Card[] getHand(int nb) {
           Card[] hand = new Card[nb];
           for(int i = 0; i < nb; ++i) {
              int index = ran.nextInt(al.size());
              hand[i] = al.remove(index);
           }
           return hand;
       }
    
    


    Sorry, I meant to say where would this go in the entire code?
  4. In Topic: Deck of Cards Applet how to shuffle and display

    Posted 17 Jan 2013

    pbl, would this go in the in the same method or different method as the one that generates the cards?
  5. In Topic: Deck of Cards Applet how to shuffle and display

    Posted 17 Jan 2013

    I'm stuck on how to get the first 10 cards, pass them to a paint method, or if I even can, and what to put for

    Collections.shuffle ( images );//how to get first ten cards
    
    public void paint ( Graphics g ) { //can i pass the first ten images to this?
    
    
    g.drawImage (whatGoesHere, 10, 10, this);
    
    

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

Comments

bwong23 has no profile comments yet. Why not say hello?