more java warning and TODO cleanup in GameAction, Player, GameSummary, CustomLimited, and CardPanelHeavy

This commit is contained in:
slapshot5
2011-11-27 18:15:12 +00:00
parent ed689a3b0e
commit 0fb8d07c74
5 changed files with 55 additions and 51 deletions

View File

@@ -1745,7 +1745,7 @@ public class GameAction {
public final void computerStartsGame() { public final void computerStartsGame() {
final Player computer = AllZone.getComputerPlayer(); final Player computer = AllZone.getComputerPlayer();
AllZone.getPhase().setPlayerTurn(computer); AllZone.getPhase().setPlayerTurn(computer);
AllZone.getGameInfo().setPlayerWhoGotFirstTurn(computer.getName()); //AllZone.getGameInfo().setPlayerWhoGotFirstTurn(computer.getName());
} }
// if Card had the type "Aura" this method would always return true, since // if Card had the type "Aura" this method would always return true, since

View File

@@ -47,7 +47,7 @@ public abstract class Player extends GameEntity {
private String altWinSourceName; private String altWinSourceName;
/** The alt lose. */ /** The alt lose. */
private boolean altLose = false; //private boolean altLose = false;
/** The loss state. */ /** The loss state. */
private GameLossReason lossState = GameLossReason.DidNotLoseYet; private GameLossReason lossState = GameLossReason.DidNotLoseYet;
@@ -149,7 +149,7 @@ public abstract class Player extends GameEntity {
nTurns = 0; nTurns = 0;
altWin = false; altWin = false;
altWinSourceName = null; altWinSourceName = null;
altLose = false; //altLose = false;
lossState = GameLossReason.DidNotLoseYet; lossState = GameLossReason.DidNotLoseYet;
loseConditionSpell = null; loseConditionSpell = null;
maxLandsToPlay = 1; maxLandsToPlay = 1;

View File

@@ -21,7 +21,7 @@ public final class GameSummary {
private String playerWinner = "Nobody"; private String playerWinner = "Nobody";
/** The player got first turn. */ /** The player got first turn. */
private String playerGotFirstTurn = "Nobody"; //private String playerGotFirstTurn = "Nobody";
/** The last turn number. */ /** The last turn number. */
private int lastTurnNumber = 0; private int lastTurnNumber = 0;
@@ -120,9 +120,11 @@ public final class GameSummary {
* *
* @param playerName the new player who got first turn * @param playerName the new player who got first turn
*/ */
/*
public void setPlayerWhoGotFirstTurn(final String playerName) { public void setPlayerWhoGotFirstTurn(final String playerName) {
this.playerGotFirstTurn = playerName; this.playerGotFirstTurn = playerName;
} }
*/
/** /**
* Notify next turn. * Notify next turn.

View File

@@ -18,7 +18,7 @@ class CustomLimited {
private String name; private String name;
/** The Type. */ /** The Type. */
private String type; //private String type;
/** The Deck file. */ /** The Deck file. */
private String deckFile; private String deckFile;
@@ -85,7 +85,7 @@ class CustomLimited {
cd.setName(value); cd.setName(value);
} }
if (key.equalsIgnoreCase("Type")) { if (key.equalsIgnoreCase("Type")) {
cd.type = value; //cd.type = value;
} }
if (key.equalsIgnoreCase("DeckFile")) { if (key.equalsIgnoreCase("DeckFile")) {
cd.setDeckFile(value); cd.setDeckFile(value);
@@ -136,10 +136,10 @@ class CustomLimited {
} }
/** /**
* @param numCards the numCards to set * @param numCardsIn the numCards to set
*/ */
public void setNumCards(int numCards) { public void setNumCards(int numCardsIn) {
this.numCards = numCards; // TODO: Add 0 to parameter's name. this.numCards = numCardsIn;
} }
/** /**
@@ -150,10 +150,10 @@ class CustomLimited {
} }
/** /**
* @param numPacks the numPacks to set * @param numPacksIn the numPacks to set
*/ */
public void setNumPacks(int numPacks) { public void setNumPacks(int numPacksIn) {
this.numPacks = numPacks; // TODO: Add 0 to parameter's name. this.numPacks = numPacksIn;
} }
/** /**
@@ -164,10 +164,10 @@ class CustomLimited {
} }
/** /**
* @param numSpecials the numSpecials to set * @param numSpecialsIn the numSpecials to set
*/ */
public void setNumSpecials(int numSpecials) { public void setNumSpecials(int numSpecialsIn) {
this.numSpecials = numSpecials; // TODO: Add 0 to parameter's name. this.numSpecials = numSpecialsIn;
} }
/** /**
@@ -178,10 +178,10 @@ class CustomLimited {
} }
/** /**
* @param singleton the singleton to set * @param singletonIn the singleton to set
*/ */
public void setSingleton(Boolean singleton) { public void setSingleton(Boolean singletonIn) {
this.singleton = singleton; // TODO: Add 0 to parameter's name. this.singleton = singletonIn;
} }
/** /**
@@ -192,10 +192,10 @@ class CustomLimited {
} }
/** /**
* @param ignoreRarity the ignoreRarity to set * @param ignoreRarityIn the ignoreRarity to set
*/ */
public void setIgnoreRarity(Boolean ignoreRarity) { public void setIgnoreRarity(Boolean ignoreRarityIn) {
this.ignoreRarity = ignoreRarity; // TODO: Add 0 to parameter's name. this.ignoreRarity = ignoreRarityIn;
} }
/** /**
@@ -206,10 +206,10 @@ class CustomLimited {
} }
/** /**
* @param numUncommons the numUncommons to set * @param numUncommonsIn the numUncommons to set
*/ */
public void setNumUncommons(int numUncommons) { public void setNumUncommons(int numUncommonsIn) {
this.numUncommons = numUncommons; // TODO: Add 0 to parameter's name. this.numUncommons = numUncommonsIn;
} }
/** /**
@@ -220,10 +220,10 @@ class CustomLimited {
} }
/** /**
* @param numCommons the numCommons to set * @param numCommonsIn the numCommons to set
*/ */
public void setNumCommons(int numCommons) { public void setNumCommons(int numCommonsIn) {
this.numCommons = numCommons; // TODO: Add 0 to parameter's name. this.numCommons = numCommonsIn;
} }
/** /**
@@ -234,10 +234,10 @@ class CustomLimited {
} }
/** /**
* @param numRares the numRares to set * @param numRaresIn the numRares to set
*/ */
public void setNumRares(int numRares) { public void setNumRares(int numRaresIn) {
this.numRares = numRares; // TODO: Add 0 to parameter's name. this.numRares = numRaresIn;
} }
/** /**
@@ -248,10 +248,10 @@ class CustomLimited {
} }
/** /**
* @param numMythics the numMythics to set * @param numMythicsIn the numMythics to set
*/ */
public void setNumMythics(int numMythics) { public void setNumMythics(int numMythicsIn) {
this.numMythics = numMythics; // TODO: Add 0 to parameter's name. this.numMythics = numMythicsIn;
} }
/** /**
@@ -262,10 +262,10 @@ class CustomLimited {
} }
/** /**
* @param deckFile the deckFile to set * @param deckFileIn the deckFile to set
*/ */
public void setDeckFile(String deckFile) { public void setDeckFile(String deckFileIn) {
this.deckFile = deckFile; // TODO: Add 0 to parameter's name. this.deckFile = deckFileIn;
} }
/** /**
@@ -276,10 +276,10 @@ class CustomLimited {
} }
/** /**
* @param landSetCode the landSetCode to set * @param landSetCodeIn the landSetCode to set
*/ */
public void setLandSetCode(String landSetCode) { public void setLandSetCode(String landSetCodeIn) {
this.landSetCode = landSetCode; // TODO: Add 0 to parameter's name. this.landSetCode = landSetCodeIn;
} }
/** /**
@@ -290,10 +290,10 @@ class CustomLimited {
} }
/** /**
* @param numDoubleFaced the numDoubleFaced to set * @param numDoubleFacedIn the numDoubleFaced to set
*/ */
public void setNumDoubleFaced(int numDoubleFaced) { public void setNumDoubleFaced(int numDoubleFacedIn) {
this.numDoubleFaced = numDoubleFaced; // TODO: Add 0 to parameter's name. this.numDoubleFaced = numDoubleFacedIn;
} }
/** /**
@@ -304,9 +304,9 @@ class CustomLimited {
} }
/** /**
* @param name the name to set * @param nameIn the name to set
*/ */
private void setName(String name) { private void setName(String nameIn) {
this.name = name; // TODO: Add 0 to parameter's name. this.name = nameIn;
} }
} }

View File

@@ -4,16 +4,16 @@ import java.awt.event.ActionEvent;
import java.io.File; import java.io.File;
import javax.swing.JButton; import javax.swing.JButton;
import javax.swing.JFileChooser; //import javax.swing.JFileChooser;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import javax.swing.filechooser.FileFilter; //import javax.swing.filechooser.FileFilter;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
import arcane.ui.CardPanel; import arcane.ui.CardPanel;
import arcane.ui.ViewPanel; import arcane.ui.ViewPanel;
import forge.Card; import forge.Card;
import forge.GuiDisplayUtil; import forge.GuiDisplayUtil;
import forge.ImagePreviewPanel; //import forge.ImagePreviewPanel;
import forge.Singletons; import forge.Singletons;
import forge.gui.game.CardDetailPanel; import forge.gui.game.CardDetailPanel;
import forge.item.CardPrinted; import forge.item.CardPrinted;
@@ -50,7 +50,7 @@ public class CardPanelHeavy extends CardPanelBase {
private Card cCardHQ; private Card cCardHQ;
/** Constant <code>previousDirectory</code>. */ /** Constant <code>previousDirectory</code>. */
private static File previousDirectory = null; //private static File previousDirectory = null;
/** /**
* Instantiates a new card panel heavy. * Instantiates a new card panel heavy.
@@ -170,6 +170,7 @@ public class CardPanelHeavy extends CardPanelBase {
* *
* @return a {@link java.io.File} object. * @return a {@link java.io.File} object.
*/ */
/*
private File getImportFilename() { private File getImportFilename() {
final JFileChooser chooser = new JFileChooser(CardPanelHeavy.previousDirectory); final JFileChooser chooser = new JFileChooser(CardPanelHeavy.previousDirectory);
final ImagePreviewPanel preview = new ImagePreviewPanel(); final ImagePreviewPanel preview = new ImagePreviewPanel();
@@ -186,9 +187,10 @@ public class CardPanelHeavy extends CardPanelBase {
return null; return null;
} } */
/** The dck filter. */ /** The dck filter. */
/*
private final FileFilter dckFilter = new FileFilter() { private final FileFilter dckFilter = new FileFilter() {
@Override @Override
@@ -201,7 +203,7 @@ public class CardPanelHeavy extends CardPanelBase {
return "*.jpg"; return "*.jpg";
} }
}; };*/
/** /**
* <p> * <p>