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