From 695f274803ddf867d224b943727107f6b46712c9 Mon Sep 17 00:00:00 2001 From: betasteward Date: Thu, 7 May 2015 10:48:44 -0400 Subject: [PATCH] allow Game objects to be serialized --- Mage/src/mage/MageObjectReference.java | 3 ++- Mage/src/mage/abilities/effects/ContinuousEffects.java | 2 +- Mage/src/mage/game/CardState.java | 3 ++- Mage/src/mage/game/events/GameEvent.java | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Mage/src/mage/MageObjectReference.java b/Mage/src/mage/MageObjectReference.java index 65d2d1a9c3..b406030eb9 100644 --- a/Mage/src/mage/MageObjectReference.java +++ b/Mage/src/mage/MageObjectReference.java @@ -28,6 +28,7 @@ package mage; +import java.io.Serializable; import java.util.UUID; import mage.cards.Card; import mage.game.Game; @@ -40,7 +41,7 @@ import mage.game.stack.Spell; * @author LevelX2 */ -public class MageObjectReference implements Comparable { +public class MageObjectReference implements Comparable, Serializable { private final UUID sourceId; private final int zoneChangeCounter; diff --git a/Mage/src/mage/abilities/effects/ContinuousEffects.java b/Mage/src/mage/abilities/effects/ContinuousEffects.java index 2ef6f8f9e1..58305dd268 100644 --- a/Mage/src/mage/abilities/effects/ContinuousEffects.java +++ b/Mage/src/mage/abilities/effects/ContinuousEffects.java @@ -1132,7 +1132,7 @@ public class ContinuousEffects implements Serializable { } } -class ContinuousEffectSorter implements Comparator { +class ContinuousEffectSorter implements Comparator, Serializable { @Override public int compare(ContinuousEffect one, ContinuousEffect two) { return Long.compare(one.getOrder(), two.getOrder()); diff --git a/Mage/src/mage/game/CardState.java b/Mage/src/mage/game/CardState.java index 0421c8ec72..1f471370f0 100644 --- a/Mage/src/mage/game/CardState.java +++ b/Mage/src/mage/game/CardState.java @@ -1,5 +1,6 @@ package mage.game; +import java.io.Serializable; import java.util.HashMap; import java.util.Map; import mage.abilities.Abilities; @@ -10,7 +11,7 @@ import mage.counters.Counters; * * @author BetaSteward */ -public class CardState { +public class CardState implements Serializable { protected boolean faceDown; protected Map info; diff --git a/Mage/src/mage/game/events/GameEvent.java b/Mage/src/mage/game/events/GameEvent.java index b885db6646..d93ee6f92f 100644 --- a/Mage/src/mage/game/events/GameEvent.java +++ b/Mage/src/mage/game/events/GameEvent.java @@ -28,6 +28,7 @@ package mage.game.events; +import java.io.Serializable; import java.util.ArrayList; import java.util.UUID; import mage.constants.Zone; @@ -36,7 +37,7 @@ import mage.constants.Zone; * * @author BetaSteward_at_googlemail.com */ -public class GameEvent { +public class GameEvent implements Serializable { protected EventType type; protected UUID targetId;