mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- CheckStyle.
This commit is contained in:
@@ -48,7 +48,7 @@ public class ViewWinLose {
|
||||
btnContinue = new FButton();
|
||||
btnRestart = new FButton();
|
||||
btnQuit = new FButton();
|
||||
|
||||
|
||||
final LobbyPlayer human = Singletons.getControl().getPlayer().getLobbyPlayer();
|
||||
|
||||
// Control of the win/lose is handled differently for various game modes.
|
||||
@@ -58,7 +58,9 @@ public class ViewWinLose {
|
||||
control = new QuestWinLose(this, match);
|
||||
break;
|
||||
case Draft:
|
||||
if (!Singletons.getModel().getGauntletMini().isGauntletDraft()) break;
|
||||
if (!Singletons.getModel().getGauntletMini().isGauntletDraft()) {
|
||||
break;
|
||||
}
|
||||
case Sealed:
|
||||
control = new LimitedWinLose(this, match);
|
||||
break;
|
||||
@@ -68,9 +70,10 @@ public class ViewWinLose {
|
||||
default: // will catch it after switch
|
||||
break;
|
||||
}
|
||||
if( null == control)
|
||||
if (null == control) {
|
||||
control = new ControlWinLose(this, match);
|
||||
|
||||
}
|
||||
|
||||
|
||||
pnlLeft.setOpaque(false);
|
||||
pnlRight.setOpaque(false);
|
||||
@@ -103,7 +106,7 @@ public class ViewWinLose {
|
||||
}
|
||||
|
||||
// Show Wins and Loses
|
||||
|
||||
|
||||
final int humanWins = match.getGamesWonBy(human);
|
||||
final int humanLosses = match.getPlayedGames().size() - humanWins;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public enum CDetail implements ICDoc {
|
||||
VDetail.SINGLETON_INSTANCE.getPnlDetail().setCard(null);
|
||||
VDetail.SINGLETON_INSTANCE.getParentCell().repaintSelf();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the current card.
|
||||
*
|
||||
|
||||
@@ -75,8 +75,8 @@ public enum CDev implements ICDoc {
|
||||
private final MouseListener madCardToBattlefield = new MouseAdapter() { @Override
|
||||
public void mousePressed(final MouseEvent e) {
|
||||
GuiDisplayUtil.devModeCardToBattlefield(); } };
|
||||
|
||||
|
||||
|
||||
|
||||
private final MouseListener madBreakpoint = new MouseAdapter() { @Override
|
||||
public void mousePressed(final MouseEvent e) {
|
||||
GuiDisplayUtil.devModeBreakpoint(); } };
|
||||
@@ -110,7 +110,7 @@ public enum CDev implements ICDoc {
|
||||
VDev.SINGLETON_INSTANCE.getLblCardToBattlefield().addMouseListener(madCardToBattlefield);
|
||||
|
||||
ForgePreferences prefs = Singletons.getModel().getPreferences();
|
||||
|
||||
|
||||
VDev.SINGLETON_INSTANCE.getLblMilling().setEnabled(prefs.getPrefBoolean(FPref.DEV_MILLING_LOSS));
|
||||
//VDev.SINGLETON_INSTANCE.getLblMilling().setEnabled(Constant.Runtime.MILL[0]);
|
||||
VDev.SINGLETON_INSTANCE.getLblUnlimitedLands().setEnabled(prefs.getPrefBoolean(FPref.DEV_UNLIMITED_LAND));
|
||||
|
||||
@@ -61,17 +61,17 @@ import forge.view.FView;
|
||||
public enum CDock implements ICDoc {
|
||||
/** */
|
||||
SINGLETON_INSTANCE;
|
||||
|
||||
|
||||
private int arcState;
|
||||
private GameState game;
|
||||
private Player player;
|
||||
|
||||
public void onGameStarts(GameState game0, Player player0)
|
||||
{
|
||||
public void onGameStarts(GameState game0, Player player0) {
|
||||
|
||||
game = game0;
|
||||
player = player0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Concede game, bring up WinLose UI. */
|
||||
public void concede() {
|
||||
@@ -104,7 +104,7 @@ public enum CDock implements ICDoc {
|
||||
};
|
||||
w.execute();
|
||||
}
|
||||
|
||||
|
||||
private void saveLayout() {
|
||||
final SwingWorker<Void, Void> w = new SwingWorker<Void, Void>() {
|
||||
@Override
|
||||
|
||||
@@ -30,9 +30,9 @@ public enum CLog implements ICDoc, Observer {
|
||||
*/
|
||||
@Override
|
||||
public void initialize() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see forge.gui.framework.ICDoc#update()
|
||||
*/
|
||||
|
||||
@@ -76,8 +76,8 @@ public enum CMessage implements ICDoc {
|
||||
VMessage.SINGLETON_INSTANCE.getTarMessage().setText(s0);
|
||||
}
|
||||
|
||||
/** Updates counter label in message area.
|
||||
* @param match
|
||||
/** Updates counter label in message area.
|
||||
* @param match
|
||||
* @param gameState */
|
||||
public void updateGameInfo(MatchController match) {
|
||||
VMessage.SINGLETON_INSTANCE.getLblGames().setText(
|
||||
|
||||
@@ -49,7 +49,7 @@ public enum CPicture implements ICDoc {
|
||||
VPicture.SINGLETON_INSTANCE.getLblFlipcard().setVisible(c != null && c.isDoubleFaced() ? true : false);
|
||||
VPicture.SINGLETON_INSTANCE.getPnlPicture().setCard(c);
|
||||
}
|
||||
|
||||
|
||||
public void showCard(final InventoryItem item) {
|
||||
this.currentCard = null;
|
||||
VPicture.SINGLETON_INSTANCE.getLblFlipcard().setVisible(false);
|
||||
|
||||
@@ -36,9 +36,9 @@ public enum CPlayers implements ICDoc {
|
||||
*/
|
||||
@Override
|
||||
public void update() {
|
||||
for(Player p : Singletons.getModel().getGame().getRegisteredPlayers())
|
||||
for (Player p : Singletons.getModel().getGame().getRegisteredPlayers()) {
|
||||
VPlayers.SINGLETON_INSTANCE.updatePlayerLabels(p);
|
||||
|
||||
}
|
||||
VPlayers.SINGLETON_INSTANCE.updateStormLabel();
|
||||
}
|
||||
|
||||
|
||||
@@ -468,7 +468,7 @@ public class CField implements ICDoc {
|
||||
//earlier it was enforced that cards must be in player zone
|
||||
//this can potentially break some other functionality
|
||||
//(tapping lands works ok but some custom cards may not...)
|
||||
|
||||
|
||||
|
||||
//in weird case card has no controller revert to default behaviour
|
||||
input.selectCard(c);
|
||||
|
||||
@@ -66,7 +66,7 @@ public class VCommand implements IVDoc<CCommand> {
|
||||
|
||||
// TODO player is hard-coded into tabletop...should be dynamic
|
||||
// (haven't looked into it too deeply). Doublestrike 12-04-12
|
||||
tabletop = new PlayArea(scroller, id0 == EDocID.COMMAND_0 );
|
||||
tabletop = new PlayArea(scroller, id0 == EDocID.COMMAND_0);
|
||||
|
||||
control = new CCommand(player, this);
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ public class VField implements IVDoc<CField> {
|
||||
|
||||
// TODO player is hard-coded into tabletop...should be dynamic
|
||||
// (haven't looked into it too deeply). Doublestrike 12-04-12
|
||||
tabletop = new PlayArea(scroller, id0 == EDocID.FIELD_1 );
|
||||
tabletop = new PlayArea(scroller, id0 == EDocID.FIELD_1);
|
||||
|
||||
control = new CField(player, this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user