mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- CheckStyle.
This commit is contained in:
@@ -183,9 +183,9 @@ public class ControlDraft {
|
||||
|
||||
/** Updates deck list in view. */
|
||||
public void updateHumanDecks() {
|
||||
|
||||
|
||||
List<Deck> human = new ArrayList<Deck>();
|
||||
for(DeckSet d : AllZone.getDecks().getDraft()) {
|
||||
for (DeckSet d : AllZone.getDecks().getDraft()) {
|
||||
human.add(d.getHumanDeck());
|
||||
}
|
||||
view.getLstHumanDecks().setDecks(human);
|
||||
|
||||
@@ -399,9 +399,11 @@ public class ControlQuest {
|
||||
/** Resets decks, then retrieves and sets current deck. */
|
||||
public void refreshDecks() {
|
||||
// Retrieve and set all decks
|
||||
|
||||
|
||||
List<Deck> temp = new ArrayList<Deck>();
|
||||
if (qData != null ) temp.addAll(qData.getMyDecks().values());
|
||||
if (qData != null) {
|
||||
temp.addAll(qData.getMyDecks().values());
|
||||
}
|
||||
view.getLstDecks().setDecks(temp);
|
||||
|
||||
// Look through list for preferred deck from prefs
|
||||
|
||||
@@ -174,21 +174,23 @@ public class ControlSealed {
|
||||
+ ">> does not equal any of the sealedTypes.");
|
||||
}
|
||||
|
||||
if (sd.getCardpool().isEmpty())
|
||||
if (sd.getCardpool().isEmpty()) {
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
final String sDeckName = JOptionPane.showInputDialog(null,
|
||||
ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.SAVE_SEALED_MSG),
|
||||
ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.SAVE_SEALED_TTL),
|
||||
JOptionPane.QUESTION_MESSAGE);
|
||||
|
||||
if ( StringUtils.isBlank(sDeckName) )
|
||||
JOptionPane.QUESTION_MESSAGE);
|
||||
|
||||
if (StringUtils.isBlank(sDeckName)) {
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
// May check for name uniqueness here
|
||||
|
||||
final ItemPool<CardPrinted> sDeck = sd.getCardpool();
|
||||
|
||||
|
||||
Deck deck = new Deck(sDeckName);
|
||||
deck.getSideboard().addAll(sDeck);
|
||||
|
||||
@@ -200,11 +202,9 @@ public class ControlSealed {
|
||||
sealed.setHumanDeck(deck);
|
||||
sealed.addAiDeck(sd.buildAIDeck(sDeck.toForgeCardList()));
|
||||
AllZone.getDecks().getSealed().add(sealed);
|
||||
|
||||
|
||||
view.getParentView().getUtilitiesController().showDeckEditor(GameType.Sealed, sealed);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** @return {@link forge.Command} What to do when the deck editor exits. */
|
||||
|
||||
@@ -153,16 +153,19 @@ public class ControlUtilities {
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> void showDeckEditor(GameType gt0, T d0) {
|
||||
|
||||
DeckEditorBase<?, T> editor = null;
|
||||
if ( gt0 == GameType.Constructed)
|
||||
editor = (DeckEditorBase<?, T>) new DeckEditorConstructed();
|
||||
if ( gt0 == GameType.Draft)
|
||||
editor = (DeckEditorBase<?, T>) new DeckEditorLimited(AllZone.getDecks().getDraft());
|
||||
if ( gt0 == GameType.Sealed)
|
||||
editor = (DeckEditorBase<?, T>) new DeckEditorLimited(AllZone.getDecks().getSealed());
|
||||
|
||||
|
||||
DeckEditorBase<?, T> editor = null;
|
||||
if (gt0 == GameType.Constructed) {
|
||||
editor = (DeckEditorBase<?, T>) new DeckEditorConstructed();
|
||||
}
|
||||
if (gt0 == GameType.Draft) {
|
||||
editor = (DeckEditorBase<?, T>) new DeckEditorLimited(AllZone.getDecks().getDraft());
|
||||
}
|
||||
if (gt0 == GameType.Sealed) {
|
||||
editor = (DeckEditorBase<?, T>) new DeckEditorLimited(AllZone.getDecks().getSealed());
|
||||
}
|
||||
|
||||
|
||||
final Command exit = new Command() {
|
||||
private static final long serialVersionUID = -9133358399503226853L;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user