mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- CheckStyle.
This commit is contained in:
@@ -401,7 +401,9 @@ public class ControlQuest {
|
||||
// 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,16 +174,18 @@ 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) )
|
||||
if (StringUtils.isBlank(sDeckName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// May check for name uniqueness here
|
||||
|
||||
@@ -201,10 +203,8 @@ public class ControlSealed {
|
||||
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. */
|
||||
|
||||
@@ -155,12 +155,15 @@ public class ControlUtilities {
|
||||
public <T> void showDeckEditor(GameType gt0, T d0) {
|
||||
|
||||
DeckEditorBase<?, T> editor = null;
|
||||
if ( gt0 == GameType.Constructed)
|
||||
if (gt0 == GameType.Constructed) {
|
||||
editor = (DeckEditorBase<?, T>) new DeckEditorConstructed();
|
||||
if ( gt0 == GameType.Draft)
|
||||
}
|
||||
if (gt0 == GameType.Draft) {
|
||||
editor = (DeckEditorBase<?, T>) new DeckEditorLimited(AllZone.getDecks().getDraft());
|
||||
if ( gt0 == GameType.Sealed)
|
||||
}
|
||||
if (gt0 == GameType.Sealed) {
|
||||
editor = (DeckEditorBase<?, T>) new DeckEditorLimited(AllZone.getDecks().getSealed());
|
||||
}
|
||||
|
||||
|
||||
final Command exit = new Command() {
|
||||
|
||||
Reference in New Issue
Block a user