private void createComponents(Container container) throws IOException {
        this.cardDrawer = new CardDrawer(container, pictureDirectory, pictureType);

        int index = 0;
        while (!deck.isEmpty()) {
            Card c = deck.takeCard();
            int xPlace = (index % 8) * 90;
            int yPlace = (index / 8) * 75;
            cardDrawer.draw(c, xPlace, yPlace, index, false);
            cardDrawer.draw(c, xPlace + 45, yPlace, index, true);

            addCardText(c, xPlace, yPlace, index, container);
            index++;
        }
    }