Strategy #31
			
				
			
		
		
		
	| 
						 | 
				
			
			@ -112,22 +112,14 @@ class GameTest {
 | 
			
		|||
 | 
			
		||||
        @Test
 | 
			
		||||
        void carTurnCorrect() {
 | 
			
		||||
            try {
 | 
			
		||||
                game.doCarTurn(RIGHT);
 | 
			
		||||
                Assertions.assertEquals(new PositionVector(1, 0), game.getCarVelocity(0));
 | 
			
		||||
            } catch (PositionVectorNotValidException positionVectorNotValidException) {
 | 
			
		||||
                positionVectorNotValidException.printStackTrace();
 | 
			
		||||
            }
 | 
			
		||||
            game.doCarTurn(RIGHT);
 | 
			
		||||
            Assertions.assertEquals(new PositionVector(1, 0), game.getCarVelocity(0));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Test
 | 
			
		||||
        void carCrash() {
 | 
			
		||||
            try {
 | 
			
		||||
                game.doCarTurn(PositionVector.Direction.UP);
 | 
			
		||||
                Assertions.assertTrue(game.onlyOneCarLeft());
 | 
			
		||||
            } catch (PositionVectorNotValidException positionVectorNotValidException) {
 | 
			
		||||
                positionVectorNotValidException.printStackTrace();
 | 
			
		||||
            }
 | 
			
		||||
            game.doCarTurn(PositionVector.Direction.UP);
 | 
			
		||||
            Assertions.assertTrue(game.onlyOneCarLeft());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue