fixed former bug
This commit is contained in:
		@@ -76,7 +76,6 @@ public void received(MoveMessage msg) {
 | 
			
		||||
            logic.getGame().getPlayerByColor(piece.getColor()).setPieceInHome(msg.getTargetIndex(), piece);
 | 
			
		||||
        } else {
 | 
			
		||||
            int oldIndex = logic.getGame().getBoard().getInfieldIndexOfPiece(piece);
 | 
			
		||||
 | 
			
		||||
            Piece occ = logic.getGame().getBoard().getInfield()[msg.getTargetIndex()].getOccupant();
 | 
			
		||||
            if (occ != null) {
 | 
			
		||||
                //TODO: MoveThrowNotification
 | 
			
		||||
@@ -84,7 +83,7 @@ public void received(MoveMessage msg) {
 | 
			
		||||
                //set occ to waiting
 | 
			
		||||
                logic.getGame().getPlayerByColor(occ.getColor()).addWaitingPiece(occ);
 | 
			
		||||
            }
 | 
			
		||||
            if(msg.getPiece().getState().equals(PieceState.WAITING)){
 | 
			
		||||
            if(oldIndex == -1){
 | 
			
		||||
                logic.addNotification(new MovePieceNotification(piece.getUuid(), msg.getTargetIndex(), true));
 | 
			
		||||
                logic.getGame().getPlayerByColor(piece.getColor()).removeWaitingPiece(piece);
 | 
			
		||||
                piece.setState(PieceState.ACTIVE);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user