private void fillPiles(){
        boolean moved = false;
        Component cmps[];
        cmps = rightPanel.getComponents();
        for(int i = 0;i < cmps.length;i++){
            CardStack csp = (CardStack)cmps[i];
            Card card = csp.getLastCard();

            if(card != null){
                if(card.getPosition().equals("left")){
                    continue;
                }
                if(card.moveLeftPanel(card,true)){
                    //card.movedUpdate();
                    moved = true;
                    break;
                }
            }
        }

        cmps = cardPanels.getComponents();
        for(int i = 0;i < cmps.length;i++){
            CardStack csp = (CardStack)cmps[i];
            Card card = csp.getLastCard();
            if(card != null){
                if(card.getPosition().equals("left")){
                    continue;
                }
                if(card.moveLeftPanel(card,true)){
                    //card.movedUpdate();
                    moved = true;
                    break;
                }
            }
        }

        if(moved){
            fillPiles();
        }
    }