- CheckStyle.

This commit is contained in:
Chris
2012-02-26 14:51:57 +00:00
parent 8eab9eb809
commit 32305cf4e3
12 changed files with 62 additions and 62 deletions

View File

@@ -206,6 +206,7 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
return Singletons.getModel().getFatPacks().contains(subject.getCode());
}
}
/**
* Checks if is legal in format.
*

View File

@@ -30,7 +30,7 @@ public class FatPackData {
private final int cntBoosters;
private final int cntLands;
public FatPackData(String edition0, String landsEdition0, int nBoosters, int nBasicLands )
public FatPackData(String edition0, String landsEdition0, int nBoosters, int nBasicLands)
{
cntBoosters = nBoosters;
cntLands = nBasicLands;

View File

@@ -75,11 +75,11 @@ public class DeckGroup extends DeckBase {
super.cloneFieldsTo(clone);
DeckGroup myClone = (DeckGroup) clone;
myClone.setHumanDeck((Deck)this.getHumanDeck().copyTo(this.getHumanDeck().getName()));
myClone.setHumanDeck((Deck) this.getHumanDeck().copyTo(this.getHumanDeck().getName()));
for(int i = 0; i < this.getAiDecks().size(); i++) {
for (int i = 0; i < this.getAiDecks().size(); i++) {
Deck src = this.getAiDecks().get(i);
myClone.addAiDeck((Deck)src.copyTo(src.getName()));
myClone.addAiDeck((Deck) src.copyTo(src.getName()));
}
}

View File

@@ -157,8 +157,9 @@ public class DeckController<T extends DeckBase> implements IDeckController<T> {
@Override
public void load(final String name) {
T newModel = this.folder.get(name);
if (null != newModel)
this.setModel((T)newModel.copyTo(name), true);
if (null != newModel) {
this.setModel((T) newModel.copyTo(name), true);
}
}
/*

View File

@@ -325,7 +325,7 @@ public class DraftingProcess extends DeckEditorBase<CardPrinted, DeckGroup> {
final Deck[] computer = this.boosterDraft.getDecks();
final DeckGroup finishedDraft = new DeckGroup("Draft " + s);
finishedDraft.setHumanDeck((Deck)this.getPlayersDeck().copyTo(s));
finishedDraft.setHumanDeck((Deck) this.getPlayersDeck().copyTo(s));
finishedDraft.addAiDecks(computer);
// DeckManager deckManager = new

View File

@@ -67,7 +67,7 @@ public class FatPack extends OpenablePack {
protected List<CardPrinted> generate() {
List<CardPrinted> result = new ArrayList<CardPrinted>();
for( int i = 0; i < fpData.getCntBoosters(); i++ ) {
for (int i = 0; i < fpData.getCntBoosters(); i++) {
result.addAll(super.generate());
}
CardEdition landEdition = Singletons.getModel().getEditions().get(fpData.getLandsEdition());
@@ -91,7 +91,7 @@ public class FatPack extends OpenablePack {
}
@Override
public int getTotalCards(){
public int getTotalCards() {
return super.getTotalCards() * fpData.getCntBoosters() + fpData.getCntLands();
}

View File

@@ -27,7 +27,6 @@ public abstract class OpenablePack implements InventoryItemFromSet {
this.name = name0;
}
@Override
public final String getName() {
return this.name + " " + this.getType();
@@ -104,7 +103,7 @@ public abstract class OpenablePack implements InventoryItemFromSet {
protected List<CardPrinted> generate() {
if ( null == generator ) {
if (null == generator) {
generator = new BoosterGenerator(this.contents.getEditionFilter());
}
List<CardPrinted> myCards = generator.getBoosterPack(this.contents);

View File

@@ -210,7 +210,6 @@ public final class QuestUtilCards {
}
}
/**
* Buy precon deck.
*
@@ -358,12 +357,12 @@ public final class QuestUtilCards {
*/
public void generateTournamentsInShop(final int count) {
Predicate<CardEdition> hasTournament = CardEdition.Predicates.HAS_TOURNAMENT_PACK;
this.q.getShopList().addAllFlat( hasTournament.random(Singletons.getModel().getEditions(), count, TournamentPack.FN_FROM_SET));
this.q.getShopList().addAllFlat(hasTournament.random(Singletons.getModel().getEditions(), count, TournamentPack.FN_FROM_SET));
}
public void generateFatPacksInShop(final int count) {
Predicate<CardEdition> hasPack = CardEdition.Predicates.HAS_FAT_PACK;
this.q.getShopList().addAllFlat( hasPack.random(Singletons.getModel().getEditions(), count, FatPack.FN_FROM_SET));
this.q.getShopList().addAllFlat(hasPack.random(Singletons.getModel().getEditions(), count, FatPack.FN_FROM_SET));
}
/**