mirror of
https://github.com/correl/mage.git
synced 2024-12-01 11:09:56 +00:00
Collection creation is simplified
This commit is contained in:
parent
7da043afd0
commit
8b31333d9d
5 changed files with 5 additions and 12 deletions
|
@ -311,8 +311,7 @@ public class DeckGeneratorPool
|
|||
*/
|
||||
public Deck getDeck() {
|
||||
Set<Card> actualDeck = deck.getCards();
|
||||
for(Card card : deckCards)
|
||||
actualDeck.add(card);
|
||||
actualDeck.addAll(deckCards);
|
||||
return deck;
|
||||
}
|
||||
|
||||
|
|
|
@ -205,9 +205,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
this.btnExpansionSearch.setVisible(false);
|
||||
this.limited = true;
|
||||
this.cards.clear();
|
||||
for (Card card : sideboard) {
|
||||
this.cards.add(card);
|
||||
}
|
||||
this.cards.addAll(sideboard);
|
||||
filterCards();
|
||||
}
|
||||
|
||||
|
|
|
@ -22,9 +22,7 @@ public class TournamentMatchesTableModel extends AbstractTableModel {
|
|||
List<TournamentGameView> views = new ArrayList<>();
|
||||
watchingAllowed = tournament.isWatchingAllowed();
|
||||
for (RoundView round : tournament.getRounds()) {
|
||||
for (TournamentGameView game : round.getGames()) {
|
||||
views.add(game);
|
||||
}
|
||||
views.addAll(round.getGames());
|
||||
}
|
||||
games = views.toArray(new TournamentGameView[0]);
|
||||
this.fireTableDataChanged();
|
||||
|
|
|
@ -232,12 +232,11 @@ public enum CopyPasteImageSource implements CardImageSource {
|
|||
@Override
|
||||
public List<String> getSupportedSets() {
|
||||
setupLinks();
|
||||
List<String> supportedSetsCopy = new ArrayList<>();
|
||||
if (supportedSets.isEmpty()) {
|
||||
supportedSets.addAll(Sets.getInstance().keySet());
|
||||
}
|
||||
|
||||
supportedSetsCopy.addAll(supportedSets);
|
||||
List<String> supportedSetsCopy = new ArrayList<>(supportedSets);
|
||||
return supportedSetsCopy;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,8 +58,7 @@ public enum ServerMessagesUtil {
|
|||
private void reloadMessages() {
|
||||
LOGGER.debug("Reading server messages...");
|
||||
List<String> motdMessages = readFromFile();
|
||||
List<String> newMessages = new ArrayList<>();
|
||||
newMessages.addAll(motdMessages);
|
||||
List<String> newMessages = new ArrayList<>(motdMessages);
|
||||
newMessages.add(getServerStatistics());
|
||||
newMessages.add(getServerStatistics2());
|
||||
|
||||
|
|
Loading…
Reference in a new issue