Merge branch 'development2' of https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-01 into development2
This commit is contained in:
		@@ -4,6 +4,7 @@
 | 
			
		||||
import pp.mdga.client.ClientState;
 | 
			
		||||
import pp.mdga.client.gamestate.DetermineStartPlayerState;
 | 
			
		||||
import pp.mdga.game.Player;
 | 
			
		||||
import pp.mdga.game.card.PowerCard;
 | 
			
		||||
import pp.mdga.message.client.AnimationEndMessage;
 | 
			
		||||
import pp.mdga.notification.AcquireCardNotification;
 | 
			
		||||
import pp.mdga.notification.ActivePlayerNotification;
 | 
			
		||||
@@ -48,10 +49,12 @@ public void enter() {
 | 
			
		||||
            logic.getGame().getBoard().getInfield()[entry.getValue().getStartNodeIndex()].setOccupant(entry.getValue().getPieces()[0]);
 | 
			
		||||
            entry.getValue().getWaitingArea()[0] = null;
 | 
			
		||||
            animationCounter++;
 | 
			
		||||
            if(entry.getKey() == logic.getOwnPlayerId()){
 | 
			
		||||
                logic.addNotification(new AcquireCardNotification(entry.getValue().getHandCards().get(0).getCard()));
 | 
			
		||||
            } else {
 | 
			
		||||
                logic.addNotification(new DrawCardNotification(entry.getValue().getColor(), entry.getValue().getHandCards().get(0).getCard()));
 | 
			
		||||
            for (PowerCard card : entry.getValue().getHandCards()){
 | 
			
		||||
                if(entry.getKey() == logic.getOwnPlayerId()){
 | 
			
		||||
                    logic.addNotification(new AcquireCardNotification(card.getCard()));
 | 
			
		||||
                } else {
 | 
			
		||||
                    logic.addNotification(new DrawCardNotification(entry.getValue().getColor(), card.getCard()));
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -183,6 +183,7 @@ else if (piece.getState() == PieceState.ACTIVE) {
 | 
			
		||||
            if (targetIdx >= 40) {
 | 
			
		||||
                int stepsToHome = 39 - normPieceIdx;
 | 
			
		||||
                int restMovement = steps - stepsToHome - 1;
 | 
			
		||||
                if(restMovement>=3) return false;
 | 
			
		||||
                System.out.println("Server: ChoosePieceStateMachine: canPieceMoveInHome: stepsToHome:" + stepsToHome + "restMovement:" + restMovement + "jumpOver:" + jumpOver(restMovement, 0, true) + "canPieceMoveInHome: return:" + true);
 | 
			
		||||
                return !jumpOver(restMovement, 0, true);
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user