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