made BonusCard Serializable and added the method calls to display handcards during the intro
This commit is contained in:
@@ -149,6 +149,7 @@ private void initializeSerializables() {
|
|||||||
Serializer.registerClass(Color.class, new EnumSerializer());
|
Serializer.registerClass(Color.class, new EnumSerializer());
|
||||||
Serializer.registerClass(PieceState.class, new EnumSerializer());
|
Serializer.registerClass(PieceState.class, new EnumSerializer());
|
||||||
Serializer.registerClass(ShieldState.class, new EnumSerializer());
|
Serializer.registerClass(ShieldState.class, new EnumSerializer());
|
||||||
|
Serializer.registerClass(BonusCard.class, new EnumSerializer());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerListeners() {
|
private void registerListeners() {
|
||||||
|
|||||||
@@ -5,7 +5,9 @@
|
|||||||
import pp.mdga.client.gamestate.DetermineStartPlayerState;
|
import pp.mdga.client.gamestate.DetermineStartPlayerState;
|
||||||
import pp.mdga.game.Player;
|
import pp.mdga.game.Player;
|
||||||
import pp.mdga.message.client.AnimationEndMessage;
|
import pp.mdga.message.client.AnimationEndMessage;
|
||||||
|
import pp.mdga.notification.AcquireCardNotification;
|
||||||
import pp.mdga.notification.ActivePlayerNotification;
|
import pp.mdga.notification.ActivePlayerNotification;
|
||||||
|
import pp.mdga.notification.DrawCardNotification;
|
||||||
import pp.mdga.notification.MovePieceNotification;
|
import pp.mdga.notification.MovePieceNotification;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -47,9 +49,9 @@ public void enter() {
|
|||||||
logic.getGame().getBoard().getInfield()[entry.getValue().getStartNodeIndex()].setOccupant(entry.getValue().getPieces()[0]);
|
logic.getGame().getBoard().getInfield()[entry.getValue().getStartNodeIndex()].setOccupant(entry.getValue().getPieces()[0]);
|
||||||
animationCounter++;
|
animationCounter++;
|
||||||
if(entry.getKey() == logic.getOwnPlayerId()){
|
if(entry.getKey() == logic.getOwnPlayerId()){
|
||||||
//logic.addNotification(new AcquireCardNotification(entry.getValue().getHandCards().get(0)));
|
logic.addNotification(new AcquireCardNotification(entry.getValue().getHandCards().get(0)));
|
||||||
} else {
|
} else {
|
||||||
//logic.addNotification(new DrawCardNotification(entry.getValue().getColor(), entry.getValue().getHandCards().get(0)));
|
logic.addNotification(new DrawCardNotification(entry.getValue().getColor(), entry.getValue().getHandCards().get(0)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
package pp.mdga.game;
|
package pp.mdga.game;
|
||||||
|
|
||||||
|
import com.jme3.network.serializing.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enum representing the different types of bonus cards.
|
* Enum representing the different types of bonus cards.
|
||||||
*/
|
*/
|
||||||
|
@Serializable
|
||||||
public enum BonusCard {
|
public enum BonusCard {
|
||||||
/**
|
/**
|
||||||
* The hidden bonus card.
|
* The hidden bonus card.
|
||||||
|
|||||||
Reference in New Issue
Block a user