Why does Collections.shuffle();not work?

edited January 2016 in Questions about Code

Hello guys, I'm wondering why my shuffle method doesn't work. Im trying to shuffle my arraylist Arraylist <Card> cards = new Arraylist <Card>(8); where I draw the images like

for (int y = 0; y < 3; y++){
    for (int x = 0; x < 4; x++){
        fv++;
        if (fv==6){
            fv=0;
        }
        cards.add( new Card (x*105+20, y*150+20, 105, 150, fv));
    }
}
Collections.shuffle(cards); 

I've imported the java.util.Collections but the images are always on the same place. Can you help me ? Thanks

(If you are wonderig what's the fv it's a face value)

Answers

Sign In or Register to comment.