mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
allow Game objects to be serialized
This commit is contained in:
parent
3231688855
commit
695f274803
4 changed files with 7 additions and 4 deletions
|
@ -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<MageObjectReference> {
|
||||
public class MageObjectReference implements Comparable<MageObjectReference>, Serializable {
|
||||
|
||||
private final UUID sourceId;
|
||||
private final int zoneChangeCounter;
|
||||
|
|
|
@ -1132,7 +1132,7 @@ public class ContinuousEffects implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
class ContinuousEffectSorter implements Comparator<ContinuousEffect> {
|
||||
class ContinuousEffectSorter implements Comparator<ContinuousEffect>, Serializable {
|
||||
@Override
|
||||
public int compare(ContinuousEffect one, ContinuousEffect two) {
|
||||
return Long.compare(one.getOrder(), two.getOrder());
|
||||
|
|
|
@ -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<String, String> info;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue