Sup!As the title says i am currently working on a Sliding Puzzle for a school project but i tackled some sort of problem when it comes to shuffling using Collections.shuffle() like this The problem seems to be that some pieces just place one over another like this
If someone could help me with an advice or propose an even better solution i am glad to hear it
public void shufflePieces()
{
List<Piesa> list=getObjects(Piece.class);
List<Piesa> rez=getObjects(Piece.class);
Collections.shuffle(list);
for(int i=0;i<worldRatio*worldRatio-1;i++) rez.get(i).setLocation(list.get(i).getX(),list.get(i).getY());
}

