- CheckStyle.

This commit is contained in:
Chris
2012-11-30 19:51:25 +00:00
parent 5551bcd55f
commit 647f4d91eb
10 changed files with 66 additions and 61 deletions

View File

@@ -145,19 +145,20 @@ public enum CSubmenuQuestData implements ICDoc {
break; break;
case CustomFormat: case CustomFormat:
if ( customFormatCodes.isEmpty() ) if (customFormatCodes.isEmpty()) {
{
int answer = JOptionPane.showConfirmDialog(null, "You have defined custom format as containing no sets.\nThis will start a game without restriction.\n\nContinue?"); int answer = JOptionPane.showConfirmDialog(null, "You have defined custom format as containing no sets.\nThis will start a game without restriction.\n\nContinue?");
if ( JOptionPane.YES_OPTION != answer ) if (JOptionPane.YES_OPTION != answer) {
return; return;
} }
}
fmtStartPool = customFormatCodes.isEmpty() ? null : new GameFormatQuest("Custom", customFormatCodes, null); // chosen sets and no banend cards fmtStartPool = customFormatCodes.isEmpty() ? null : new GameFormatQuest("Custom", customFormatCodes, null); // chosen sets and no banend cards
break; break;
case SealedDeck: case SealedDeck:
dckStartPool = view.getSelectedDeck(); dckStartPool = view.getSelectedDeck();
if ( null == dckStartPool ) if (null == dckStartPool) {
{
JOptionPane.showMessageDialog(null, "You have not selected a deck to start", "Cannot start a quest", JOptionPane.ERROR_MESSAGE); JOptionPane.showMessageDialog(null, "You have not selected a deck to start", "Cannot start a quest", JOptionPane.ERROR_MESSAGE);
return; return;
} }
@@ -165,8 +166,8 @@ public enum CSubmenuQuestData implements ICDoc {
case DraftDeck: case DraftDeck:
dckStartPool = view.getSelectedDeck(); dckStartPool = view.getSelectedDeck();
if ( null == dckStartPool ) if (null == dckStartPool) {
{
JOptionPane.showMessageDialog(null, "You have not selected a deck to start", "Cannot start a quest", JOptionPane.ERROR_MESSAGE); JOptionPane.showMessageDialog(null, "You have not selected a deck to start", "Cannot start a quest", JOptionPane.ERROR_MESSAGE);
return; return;
} }
@@ -190,28 +191,31 @@ public enum CSubmenuQuestData implements ICDoc {
List<String> sets = new ArrayList<String>(); List<String> sets = new ArrayList<String>();
for (Entry<CardPrinted, Integer> c : dckStartPool.getMain()) { for (Entry<CardPrinted, Integer> c : dckStartPool.getMain()) {
String edition = c.getKey().getEdition(); String edition = c.getKey().getEdition();
if ( !sets.contains(edition) ) if (!sets.contains(edition)) {
sets.add(edition); sets.add(edition);
} }
}
for (Entry<CardPrinted, Integer> c : dckStartPool.getSideboard()) { for (Entry<CardPrinted, Integer> c : dckStartPool.getSideboard()) {
String edition = c.getKey().getEdition(); String edition = c.getKey().getEdition();
if ( !sets.contains(edition) ) if (!sets.contains(edition)) {
sets.add(edition); sets.add(edition);
} }
}
fmtPrizes = new GameFormat("From deck", sets, null); fmtPrizes = new GameFormat("From deck", sets, null);
} }
} else } else {
switch(prizedPoolType) { switch(prizedPoolType) {
case Complete: case Complete:
fmtPrizes = null; fmtPrizes = null;
break; break;
case CustomFormat: case CustomFormat:
if ( customPrizeFormatCodes.isEmpty() ) if (customPrizeFormatCodes.isEmpty()) {
{
int answer = JOptionPane.showConfirmDialog(null, "You have defined custom format as containing no sets.\nThis will choose all editions without restriction as prized.\n\nContinue?"); int answer = JOptionPane.showConfirmDialog(null, "You have defined custom format as containing no sets.\nThis will choose all editions without restriction as prized.\n\nContinue?");
if ( JOptionPane.YES_OPTION != answer ) if (JOptionPane.YES_OPTION != answer) {
return; return;
} }
}
fmtPrizes = customPrizeFormatCodes.isEmpty() ? null : new GameFormat("Custom Prizes", customPrizeFormatCodes, null); // chosen sets and no banend cards fmtPrizes = customPrizeFormatCodes.isEmpty() ? null : new GameFormat("Custom Prizes", customPrizeFormatCodes, null); // chosen sets and no banend cards
break; break;
case Rotating: case Rotating:
@@ -220,6 +224,7 @@ public enum CSubmenuQuestData implements ICDoc {
default: default:
throw new RuntimeException("Should not get this result"); throw new RuntimeException("Should not get this result");
} }
}
final Object o = JOptionPane.showInputDialog(null, "Poets will remember your quest as:", "Quest Name", JOptionPane.OK_CANCEL_OPTION); final Object o = JOptionPane.showInputDialog(null, "Poets will remember your quest as:", "Quest Name", JOptionPane.OK_CANCEL_OPTION);