mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- CheckStyle.
This commit is contained in:
@@ -523,18 +523,23 @@ public class BoosterDraftAI {
|
||||
for (ManaCostShard shard : mc.getShards()) {
|
||||
byte mask = shard.getColorMask();
|
||||
|
||||
if ((mask & CardColor.WHITE) > 0 )
|
||||
if ((mask & CardColor.WHITE) > 0) {
|
||||
clrCnts[0].setCount(clrCnts[0].getCount() + 1);
|
||||
if ((mask & CardColor.BLUE) > 0 )
|
||||
}
|
||||
if ((mask & CardColor.BLUE) > 0) {
|
||||
clrCnts[1].setCount(clrCnts[1].getCount() + 1);
|
||||
if ((mask & CardColor.BLACK) > 0 )
|
||||
}
|
||||
if ((mask & CardColor.BLACK) > 0) {
|
||||
clrCnts[2].setCount(clrCnts[2].getCount() + 1);
|
||||
if ((mask & CardColor.RED) > 0 )
|
||||
}
|
||||
if ((mask & CardColor.RED) > 0) {
|
||||
clrCnts[3].setCount(clrCnts[3].getCount() + 1);
|
||||
if ((mask & CardColor.GREEN) > 0 )
|
||||
}
|
||||
if ((mask & CardColor.GREEN) > 0) {
|
||||
clrCnts[4].setCount(clrCnts[4].getCount() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (landsNeeded > 0) {
|
||||
// total of all ClrCnts
|
||||
|
||||
@@ -361,18 +361,23 @@ public class SealedDeck {
|
||||
for (ManaCostShard shard : mc.getShards()) {
|
||||
byte mask = shard.getColorMask();
|
||||
|
||||
if ((mask & CardColor.WHITE) > 0 )
|
||||
if ((mask & CardColor.WHITE) > 0) {
|
||||
clrCnts[0].setCount(clrCnts[0].getCount() + 1);
|
||||
if ((mask & CardColor.BLUE) > 0 )
|
||||
}
|
||||
if ((mask & CardColor.BLUE) > 0) {
|
||||
clrCnts[1].setCount(clrCnts[1].getCount() + 1);
|
||||
if ((mask & CardColor.BLACK) > 0 )
|
||||
}
|
||||
if ((mask & CardColor.BLACK) > 0) {
|
||||
clrCnts[2].setCount(clrCnts[2].getCount() + 1);
|
||||
if ((mask & CardColor.RED) > 0 )
|
||||
}
|
||||
if ((mask & CardColor.RED) > 0) {
|
||||
clrCnts[3].setCount(clrCnts[3].getCount() + 1);
|
||||
if ((mask & CardColor.GREEN) > 0 )
|
||||
}
|
||||
if ((mask & CardColor.GREEN) > 0) {
|
||||
clrCnts[4].setCount(clrCnts[4].getCount() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// total of all ClrCnts
|
||||
int totalColor = 0;
|
||||
|
||||
@@ -195,7 +195,6 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Removes the.
|
||||
*
|
||||
|
||||
@@ -138,7 +138,6 @@ public class CardFaceSymbols {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
final int genericManaCost = manaCost.getGenericCost();
|
||||
final boolean hasGeneric = (genericManaCost > 0) || manaCost.isPureGeneric();
|
||||
final List<ManaCostShard> shards = manaCost.getShards();
|
||||
@@ -234,7 +233,7 @@ public class CardFaceSymbols {
|
||||
*/
|
||||
public static int getWidth(final CardManaCost manaCost) {
|
||||
int width = manaCost.getShards().size();
|
||||
if ( manaCost.getGenericCost() > 0 || ( manaCost.getGenericCost() == 0 && width == 0 ) );
|
||||
if (manaCost.getGenericCost() > 0 || (manaCost.getGenericCost() == 0 && width == 0));
|
||||
width++;
|
||||
|
||||
/*
|
||||
|
||||
@@ -35,7 +35,6 @@ public class SaveOpenDialog extends JPanel {
|
||||
|
||||
private JFileChooser fc;
|
||||
|
||||
|
||||
/**
|
||||
* Enum to contain information for filetype filtering in the open/save dialog.
|
||||
* Add more entries to enum as needed.
|
||||
@@ -56,13 +55,12 @@ public class SaveOpenDialog extends JPanel {
|
||||
|
||||
/**
|
||||
*
|
||||
* constructor for a save or open dialog
|
||||
* constructor for a save or open dialog.
|
||||
*/
|
||||
public SaveOpenDialog() {
|
||||
fc = new JFileChooser();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Shows the open dialog for files. If no file selected, returns null. Pass null
|
||||
* to Type to allow all files to be viewed/opened.
|
||||
@@ -74,13 +72,12 @@ public class SaveOpenDialog extends JPanel {
|
||||
public File OpenDialog(final File defFileName, final Filetypes type) {
|
||||
fc.setCurrentDirectory(defFileName);
|
||||
|
||||
if (type!=null) {
|
||||
if (type != null) {
|
||||
fc.setAcceptAllFileFilterUsed(false);
|
||||
final FileFilter filter = new FileNameExtensionFilter(type.TypeName, type.TypeExtension);
|
||||
fc.addChoosableFileFilter(filter);
|
||||
}
|
||||
|
||||
|
||||
int RetValue = fc.showOpenDialog(getParent());
|
||||
if (RetValue == JFileChooser.APPROVE_OPTION) {
|
||||
final File RetFile = fc.getSelectedFile();
|
||||
@@ -102,7 +99,7 @@ public class SaveOpenDialog extends JPanel {
|
||||
fc.setCurrentDirectory(defFileName);
|
||||
|
||||
/* set the file filter if desired */
|
||||
if (type!=null) {
|
||||
if (type != null) {
|
||||
fc.setAcceptAllFileFilterUsed(false);
|
||||
final FileFilter filter = new FileNameExtensionFilter(type.TypeName, type.TypeExtension);
|
||||
fc.addChoosableFileFilter(filter);
|
||||
@@ -115,11 +112,10 @@ public class SaveOpenDialog extends JPanel {
|
||||
RetFile = fc.getSelectedFile();
|
||||
|
||||
/* Adds extension if it is known and not given */
|
||||
if (type!=null & !(RetFile.getAbsolutePath().endsWith(type.TypeExtension))) {
|
||||
RetFile = new File(RetFile.getAbsolutePath()+"."+type.TypeExtension);
|
||||
if (type != null & !(RetFile.getAbsolutePath().endsWith(type.TypeExtension))) {
|
||||
RetFile = new File(RetFile.getAbsolutePath() + "." + type.TypeExtension);
|
||||
}
|
||||
|
||||
|
||||
return RetFile;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user