mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Code cleanup
This commit is contained in:
@@ -59,8 +59,7 @@ public class RestartGameEffect extends SpellAbilityEffect {
|
|||||||
GameAction action = game.getAction();
|
GameAction action = game.getAction();
|
||||||
|
|
||||||
List<Player> gamePlayers = game.getRegisteredPlayers();
|
List<Player> gamePlayers = game.getRegisteredPlayers();
|
||||||
for( int i = 0; i < gamePlayers.size(); i++ ) {
|
for (int i = 0; i < gamePlayers.size(); i++) {
|
||||||
|
|
||||||
final Player player = gamePlayers.get(i);
|
final Player player = gamePlayers.get(i);
|
||||||
if( player.hasLost()) continue;
|
if( player.hasLost()) continue;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import forge.game.player.Player;
|
|||||||
import forge.util.Lang;
|
import forge.util.Lang;
|
||||||
|
|
||||||
public class GameEventPlayerLivesChanged extends GameEvent {
|
public class GameEventPlayerLivesChanged extends GameEvent {
|
||||||
|
|
||||||
public final Player player;
|
public final Player player;
|
||||||
public final int oldLives;
|
public final int oldLives;
|
||||||
public final int newLives;
|
public final int newLives;
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ public class FControlGameEventHandler extends IGameEventVisitor.Base<Void> {
|
|||||||
private final AtomicBoolean turnUpdPlanned = new AtomicBoolean(false);
|
private final AtomicBoolean turnUpdPlanned = new AtomicBoolean(false);
|
||||||
@Override
|
@Override
|
||||||
public Void visit(final GameEventTurnBegan event) {
|
public Void visit(final GameEventTurnBegan event) {
|
||||||
|
|
||||||
if (FModel.getPreferences().getPrefBoolean(FPref.UI_STACK_CREATURES) && event.turnOwner != null) {
|
if (FModel.getPreferences().getPrefBoolean(FPref.UI_STACK_CREATURES) && event.turnOwner != null) {
|
||||||
// anything except stack will get here
|
// anything except stack will get here
|
||||||
updateZone(Pair.of(event.turnOwner, ZoneType.Battlefield));
|
updateZone(Pair.of(event.turnOwner, ZoneType.Battlefield));
|
||||||
@@ -339,8 +338,9 @@ public class FControlGameEventHandler extends IGameEventVisitor.Base<Void> {
|
|||||||
manaPoolUpdate.add(event.player);
|
manaPoolUpdate.add(event.player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (invokeUpdate)
|
if (invokeUpdate) {
|
||||||
FThreads.invokeInEdtNowOrLater(updManaPool);
|
FThreads.invokeInEdtNowOrLater(updManaPool);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,8 +363,9 @@ public class FControlGameEventHandler extends IGameEventVisitor.Base<Void> {
|
|||||||
livesUpdate.add(event.player);
|
livesUpdate.add(event.player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (invokeUpdate)
|
if (invokeUpdate) {
|
||||||
FThreads.invokeInEdtNowOrLater(updLives);
|
FThreads.invokeInEdtNowOrLater(updLives);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,8 +378,9 @@ public class FControlGameEventHandler extends IGameEventVisitor.Base<Void> {
|
|||||||
livesUpdate.add(event.receiver);
|
livesUpdate.add(event.receiver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (invokeUpdate)
|
if (invokeUpdate) {
|
||||||
FThreads.invokeInEdtNowOrLater(updLives);
|
FThreads.invokeInEdtNowOrLater(updLives);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user