made all 'PowerCards' serializable
This commit is contained in:
		@@ -5,6 +5,7 @@
 | 
			
		||||
import com.jme3.network.serializing.serializers.EnumSerializer;
 | 
			
		||||
import pp.mdga.Resources;
 | 
			
		||||
import pp.mdga.game.*;
 | 
			
		||||
import pp.mdga.game.card.*;
 | 
			
		||||
import pp.mdga.message.client.*;
 | 
			
		||||
import pp.mdga.message.server.*;
 | 
			
		||||
import pp.mdga.server.ServerGameLogic;
 | 
			
		||||
@@ -145,6 +146,11 @@ private void initializeSerializables() {
 | 
			
		||||
        Serializer.registerClass(BonusNode.class);
 | 
			
		||||
        Serializer.registerClass(StartNode.class);
 | 
			
		||||
        Serializer.registerClass(HomeNode.class);
 | 
			
		||||
        Serializer.registerClass(PowerCard.class);
 | 
			
		||||
        Serializer.registerClass(TurboCard.class);
 | 
			
		||||
        Serializer.registerClass(SwapCard.class);
 | 
			
		||||
        Serializer.registerClass(ShieldCard.class);
 | 
			
		||||
        Serializer.registerClass(HiddenCard.class);
 | 
			
		||||
 | 
			
		||||
        Serializer.registerClass(Color.class, new EnumSerializer());
 | 
			
		||||
        Serializer.registerClass(PieceState.class, new EnumSerializer());
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,13 @@
 | 
			
		||||
package pp.mdga.game.card;
 | 
			
		||||
 | 
			
		||||
import com.jme3.network.serializing.Serializable;
 | 
			
		||||
import pp.mdga.game.BonusCard;
 | 
			
		||||
import pp.mdga.visitor.Visitor;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This class represents the hidden power card of this application.
 | 
			
		||||
 */
 | 
			
		||||
@Serializable
 | 
			
		||||
public class HiddenCard extends PowerCard {
 | 
			
		||||
    /**
 | 
			
		||||
     * Constructor.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,13 @@
 | 
			
		||||
package pp.mdga.game.card;
 | 
			
		||||
 | 
			
		||||
import com.jme3.network.serializing.Serializable;
 | 
			
		||||
import pp.mdga.game.BonusCard;
 | 
			
		||||
import pp.mdga.visitor.Visitor;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This class represents the shield power card of this application.
 | 
			
		||||
 */
 | 
			
		||||
@Serializable
 | 
			
		||||
public class ShieldCard extends PowerCard {
 | 
			
		||||
    /**
 | 
			
		||||
     * Constructor.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,13 @@
 | 
			
		||||
package pp.mdga.game.card;
 | 
			
		||||
 | 
			
		||||
import com.jme3.network.serializing.Serializable;
 | 
			
		||||
import pp.mdga.game.BonusCard;
 | 
			
		||||
import pp.mdga.visitor.Visitor;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This class represents the swap power card of this application.
 | 
			
		||||
 */
 | 
			
		||||
@Serializable
 | 
			
		||||
public class SwapCard extends PowerCard {
 | 
			
		||||
    /**
 | 
			
		||||
     * Constructor.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,13 @@
 | 
			
		||||
package pp.mdga.game.card;
 | 
			
		||||
 | 
			
		||||
import com.jme3.network.serializing.Serializable;
 | 
			
		||||
import pp.mdga.game.BonusCard;
 | 
			
		||||
import pp.mdga.visitor.Visitor;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This class represents the turbo power card of this application.
 | 
			
		||||
 */
 | 
			
		||||
@Serializable
 | 
			
		||||
public class TurboCard extends PowerCard {
 | 
			
		||||
    /**
 | 
			
		||||
     * Constructor.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user