mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- CheckStyle.
This commit is contained in:
@@ -71,7 +71,9 @@ public final class CardUtil {
|
||||
* @return a {@link forge.Card} object.
|
||||
*/
|
||||
public static <T> T getRandom(final T[] o) {
|
||||
if ( o == null ) throw new IllegalArgumentException("CardUtil : getRandom(T) recieved null instead of array.");
|
||||
if (o == null) {
|
||||
throw new IllegalArgumentException("CardUtil : getRandom(T) recieved null instead of array.");
|
||||
}
|
||||
int len = o.length;
|
||||
switch(len) {
|
||||
case 0: throw new IllegalArgumentException("CardUtil : getRandom(T) recieved an empty array.");
|
||||
|
||||
@@ -227,7 +227,7 @@ public class ComputerAIGeneral implements Computer {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the spellAbilities from the card list
|
||||
* Returns the spellAbilities from the card list.
|
||||
*
|
||||
* @param l
|
||||
* a {@link forge.CardList} object.
|
||||
|
||||
@@ -199,8 +199,9 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
|
||||
@Override
|
||||
public final void setCards(final Iterable<Card> cards) {
|
||||
List<Card> toSet = new ArrayList<Card>();
|
||||
for(Card c : cards)
|
||||
for (Card c : cards) {
|
||||
toSet.add(c);
|
||||
}
|
||||
this.setCardList(toSet);
|
||||
this.update();
|
||||
}
|
||||
|
||||
@@ -353,12 +353,13 @@ public class PlayerZoneComesIntoPlay extends DefaultPlayerZone {
|
||||
// Battlefield filters out Phased Out cards by default. Needs to call
|
||||
// getCards(false) to get Phased Out cards
|
||||
|
||||
if (!filter)
|
||||
if (!filter) {
|
||||
return new ArrayList<Card>(this.getCardList());
|
||||
}
|
||||
|
||||
final ArrayList<Card> list = new ArrayList<Card>();
|
||||
for(Card crd : this.getCardList())
|
||||
{
|
||||
for (Card crd : this.getCardList()) {
|
||||
|
||||
if (!crd.isPhasedOut()) {
|
||||
list.add(crd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user