Replace waitMoveNotification with moveNotification

This commit is contained in:
Felix Koppe
2024-12-08 18:09:13 +01:00
parent f489357bbb
commit ab9de3acf8
5 changed files with 6 additions and 1 deletions

View File

@@ -152,6 +152,7 @@ public void received(RankingResponseMessage msg){
*/
@Override
public void received(SelectPieceMessage msg){
System.out.println("SelectPieceMessage received in GameState");
state.received(msg);
}

View File

@@ -70,6 +70,7 @@ public void selectAnimationEnd(){
@Override
public void received(SelectPieceMessage msg){
System.out.println("SelectPieceMessage received in TurnState");
state.received(msg);
}

View File

@@ -49,6 +49,7 @@ public void selectPiece(Piece piece){
@Override
public void received(SelectPieceMessage msg){
System.out.println("SelectPieceMessage received in ChoosePieceState");
currentState.received(msg);
}

View File

@@ -6,6 +6,7 @@
import pp.mdga.game.Piece;
import pp.mdga.message.server.*;
import pp.mdga.message.server.StartPieceMessage;
import pp.mdga.notification.MovePieceNotification;
import pp.mdga.notification.SelectableMoveNotification;
import pp.mdga.notification.WaitMoveNotification;
@@ -48,7 +49,7 @@ public void received(SelectPieceMessage msg) {
@Override
public void received(WaitPieceMessage msg){
LOGGER.log(System.Logger.Level.INFO, "Received WaitPieceMessage");
logic.addNotification(new WaitMoveNotification(msg.getPieceID()));
logic.addNotification(new MovePieceNotification(msg.getPieceID(), logic.getGame().getPlayerByColor(logic.getGame().getActiveColor()).getStartNodeIndex(), true));
parent.setState(parent.getWaitingPiece());
}

View File

@@ -27,6 +27,7 @@ public WaitingPieceState(ClientState parent, ClientGameLogic logic) {
@Override
public void enter() {
moveablePiece = null;
}
@Override