private final List<PilePanel> pilePanels = new ArrayList<>(16);
public GamePanel(Game game) {
for (Cell cell : game.getCells()) {
pilePanels.add(new StackedPilePanel(cell));
}
for (Foundation foundation : game.getFoundations()) {
pilePanels.add(new StackedPilePanel(foundation));
}
for (Tableau tableau : game.getTableaux()) {
pilePanels.add(new CascadingPilePanel(tableau));
}
super.setLayout(new GridBagLayout());