- CheckStyle.

This commit is contained in:
Chris
2012-12-18 18:23:21 +00:00
parent a0c8e7a50c
commit c5e2ff4847
17 changed files with 73 additions and 73 deletions

View File

@@ -210,30 +210,30 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
public abstract boolean isComputer();
public abstract PlayerType getType();
public List<Card> getSchemeDeck()
{
public List<Card> getSchemeDeck() {
return schemeDeck;
}
public void setSchemeDeck(Iterable<Card> sd)
{
public void setSchemeDeck(Iterable<Card> sd) {
schemeDeck.clear();
for(Card c : sd)
{
for (Card c : sd) {
schemeDeck.add(c);
c.setOwner(this);
}
CardLists.shuffle(schemeDeck);
}
public boolean isArchenemy()
{
public boolean isArchenemy() {
//Only the archenemy has schemes.
return schemeDeck.size() > 0;
}
public void setSchemeInMotion()
{
public void setSchemeInMotion() {
// Replacement effects
final HashMap<String, Object> repRunParams = new HashMap<String, Object>();
repRunParams.put("Event", "SetInMotion");

View File

@@ -237,9 +237,9 @@ public class GuiChoose {
if (sideboardingMode) {
persistentDeck.getMain().clear();
persistentDeck.getMain().add((List<Card>)dual.getOrderedList());
persistentDeck.getMain().add((List<Card>) dual.getOrderedList());
persistentDeck.getSideboard().clear();
persistentDeck.getSideboard().add((List<Card>)dual.getRemainingSourceList());
persistentDeck.getSideboard().add((List<Card>) dual.getRemainingSourceList());
}
dialog.dispose();

View File

@@ -129,8 +129,8 @@ public class SEditorIO {
// Confirm if overwrite
else if (controller.fileExists(name)) {
final int m = JOptionPane.showConfirmDialog(null,
limitedDeckMode ? "Would you like to save changes to your deck?" :
"There is already a deck named '" + name + "'. Overwrite?",
limitedDeckMode ? "Would you like to save changes to your deck?"
: "There is already a deck named '" + name + "'. Overwrite?",
limitedDeckMode ? "Save changes?" : "Overwrite Deck?",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);

View File

@@ -121,7 +121,7 @@ public final class CEditorScheme extends ACEditorBase<CardPrinted, Deck> {
*/
@Override
public void resetTables() {
this.getTableCatalog().setDeck(ItemPool.createFrom(Iterables.filter(CardDb.instance().getAllNonTraditionalCards(),CardPrinted.Predicates.type("Scheme")), CardPrinted.class));
this.getTableCatalog().setDeck(ItemPool.createFrom(Iterables.filter(CardDb.instance().getAllNonTraditionalCards(), CardPrinted.Predicates.type("Scheme")), CardPrinted.class));
this.getTableDeck().setDeck(this.controller.getModel().getSchemes());
}

View File

@@ -326,7 +326,7 @@ public final class EditorTableView<T extends InventoryItem> {
/**
*
* setWantUnique
* setWantUnique.
*
* @param unique if true, the editor will be set to the "unique card names only" mode.
*/
@@ -336,7 +336,7 @@ public final class EditorTableView<T extends InventoryItem> {
/**
*
* getAlwaysNonUnique
* getAlwaysNonUnique.
*
* @return if ture, this editor must always show non-unique cards (e.g. quest editor).
*/
@@ -346,7 +346,7 @@ public final class EditorTableView<T extends InventoryItem> {
/**
*
* setAlwaysNonUnique
* setAlwaysNonUnique.
*
* @param nonUniqueOnly if true, this editor must always show non-unique cards (e.g. quest editor).
*/

View File

@@ -79,7 +79,7 @@ public class ManaCostRenderer extends DefaultTableCellRenderer {
// Display X Mana before any other type of mana
if (xManaCosts > 0) {
for(int i = 0; i < xManaCosts; i++) {
for (int i = 0; i < xManaCosts; i++) {
CardFaceSymbols.drawSymbol(ManaCostShard.X.getImageKey(), g, (int) xpos, 1);
xpos += offset;
}

View File

@@ -159,18 +159,17 @@ public enum CSubmenuArchenemy implements ICDoc {
} else {
if (obj instanceof String) {
String sel = (String)obj;
if(sel.equals("Random"))
{
String sel = (String) obj;
if (sel.equals("Random")) {
schemes = Iterables.get(view.getAllSchemeDecks(), rnd.nextInt(Iterables.size(view.getAllSchemeDecks()))).getSchemes().toFlatList();
}
else
{
} else {
//Generate
schemes = DeckgenUtil.generateSchemeDeck().getSchemes().toFlatList();
}
} else {
schemes = ((Deck)obj).getSchemes().toFlatList();
schemes = ((Deck) obj).getSchemes().toFlatList();
}
}
if (schemes == null) {
@@ -189,13 +188,12 @@ public enum CSubmenuArchenemy implements ICDoc {
for (int i = 0; i < view.getNumPlayers(); i++) {
LobbyPlayer player = lobby.findLocalPlayer(i == 0 ? PlayerType.HUMAN : PlayerType.COMPUTER);
if(i == 0)
{
if (i == 0) {
helper.addArchenemy(player, playerDecks.get(i), schemes);
helper.getPlayerMap().get(player).setStartingLife(10 + (10*(view.getNumPlayers()-1)));
}
else
{
helper.getPlayerMap().get(player).setStartingLife(10 + (10 * (view.getNumPlayers() - 1)));
} else {
helper.addPlayer(player, playerDecks.get(i));
}
}

View File

@@ -133,14 +133,14 @@ public enum VSubmenuArchenemy implements IVSubmenu<CSubmenuArchenemy> {
deckChoosers.add(tempChooser);
tempPanel.add(tempChooser, "span 1 2, w 44%!, gap 0 0 20px 20px, growy, pushy, wrap");
if(i == 0)
{
if (i == 0) {
tempPanel.add(new FLabel.Builder().text("Select Scheme deck:").build(), "flowy");
Vector<Object> listData = new Vector<Object>();
listData.add("Random");
listData.add("Generate");
for(Deck schemeDeck : Singletons.getModel().getDecks().getScheme()) {
for (Deck schemeDeck : Singletons.getModel().getDecks().getScheme()) {
listData.add(schemeDeck);
}

View File

@@ -122,7 +122,7 @@ public enum VLog implements IVDoc<CLog> {
pnl.removeAll();
for (int i = size-1; i >= 0; i--) {
for (int i = size - 1; i >= 0; i--) {
JTextArea tar = new JTextArea(data.get(i).getMessage());
if (i % 2 == 1) { tar.setOpaque(false); }

View File

@@ -112,8 +112,9 @@ public class EventVisualizer {
if (sa.isSpell()) {
// if there's a specific effect for this particular card, play it and
// we're done.
if (getSpecificCardEffect(source))
if (getSpecificCardEffect(source)) {
return SoundEffectType.ScriptedEffect;
}
if (source.isCreature() && source.isArtifact()) {
return SoundEffectType.ArtifactCreature;
@@ -159,8 +160,9 @@ public class EventVisualizer {
// if there's a specific effect for this particular card, play it and
// we're done.
if (getSpecificCardEffect(land))
if (getSpecificCardEffect(land)) {
return SoundEffectType.ScriptedEffect;
}
final List<SpellAbility> manaProduced = land.getManaAbility();