mirror of
				https://github.com/inf112-v20/Fiasko.git
				synced 2025-11-04 11:43:44 +01:00 
			
		
		
		
	Legger tilbake glemt transportbånd rotasjon
This commit is contained in:
		@@ -301,6 +301,12 @@ public class RoboRallyGame implements IDrawableGame {
 | 
				
			|||||||
                if (gameBoard.isConveyorBelt(gameBoard.getTileOnPosition(newPosition))) {
 | 
					                if (gameBoard.isConveyorBelt(gameBoard.getTileOnPosition(newPosition))) {
 | 
				
			||||||
                    newPositions.put(robotAtConveyorBelt, newPosition);
 | 
					                    newPositions.put(robotAtConveyorBelt, newPosition);
 | 
				
			||||||
                    moveNormally.put(robotAtConveyorBelt, false);
 | 
					                    moveNormally.put(robotAtConveyorBelt, false);
 | 
				
			||||||
 | 
					                    Direction newDirection = gameBoard.getTileOnPosition(newPosition).getDirection();
 | 
				
			||||||
 | 
					                    if (Direction.getRightRotatedDirection(newDirection) == conveyorBeltDirection) {
 | 
				
			||||||
 | 
					                        gameBoard.rotateRobotLeft(robotAtConveyorBelt);
 | 
				
			||||||
 | 
					                    } else if (Direction.getLeftRotatedDirection(newDirection) == conveyorBeltDirection) {
 | 
				
			||||||
 | 
					                        gameBoard.rotateRobotRight(robotAtConveyorBelt);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                    newPositions.put(robotAtConveyorBelt, conveyorBeltPosition);
 | 
					                    newPositions.put(robotAtConveyorBelt, conveyorBeltPosition);
 | 
				
			||||||
                    moveNormally.put(robotAtConveyorBelt, true);
 | 
					                    moveNormally.put(robotAtConveyorBelt, true);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user