From ac530561179e879af884ff61d952b6c12ff37c8e Mon Sep 17 00:00:00 2001 From: melvin Date: Fri, 17 Jun 2011 14:54:20 +0800 Subject: [PATCH] improve readability --- src/magic/model/phase/MagicDefaultGameplay.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/magic/model/phase/MagicDefaultGameplay.java b/src/magic/model/phase/MagicDefaultGameplay.java index 91eff8aed5..09a175d44a 100644 --- a/src/magic/model/phase/MagicDefaultGameplay.java +++ b/src/magic/model/phase/MagicDefaultGameplay.java @@ -6,19 +6,15 @@ public class MagicDefaultGameplay implements MagicGameplay { private static final MagicGameplay INSTANCE=new MagicDefaultGameplay(); - private MagicDefaultGameplay() { - - } + private MagicDefaultGameplay() {} @Override public MagicPhase getStartPhase(MagicGame game) { - return MagicUntapPhase.getInstance(); } @Override public MagicPhase getNextPhase(final MagicGame game) { - switch (game.getPhase().getType()) { case Untap: return MagicUpkeepPhase.getInstance(); @@ -27,11 +23,15 @@ public class MagicDefaultGameplay implements MagicGameplay { case Draw: return MagicMainPhase.getFirstInstance(); case FirstMain: - return game.canSkip()?MagicDeclareAttackersPhase.getInstance():MagicBeginOfCombatPhase.getInstance(); + return game.canSkip() ? + MagicDeclareAttackersPhase.getInstance() : + MagicBeginOfCombatPhase.getInstance(); case BeginOfCombat: return MagicDeclareAttackersPhase.getInstance(); case DeclareAttackers: - return game.getTurnPlayer().getNrOfAttackers()>0?MagicDeclareBlockersPhase.getInstance():MagicEndOfCombatPhase.getInstance(); + return game.getTurnPlayer().getNrOfAttackers() > 0 ? + MagicDeclareBlockersPhase.getInstance() : + MagicEndOfCombatPhase.getInstance(); case DeclareBlockers: return MagicCombatDamagePhase.getInstance(); case CombatDamage: @@ -50,7 +50,6 @@ public class MagicDefaultGameplay implements MagicGameplay { } public static MagicGameplay getInstance() { - return INSTANCE; } -} \ No newline at end of file +}