Fixed Error in CarTest.java #20
			
				
			
		
		
		
	| 
						 | 
					@ -105,7 +105,10 @@ class CarTest {
 | 
				
			||||||
        car.move();
 | 
					        car.move();
 | 
				
			||||||
        checkNextPosition(DEFAULT_X, DEFAULT_Y);
 | 
					        checkNextPosition(DEFAULT_X, DEFAULT_Y);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for (PositionVector.Direction direction1 : directions) {
 | 
					        for (PositionVector.Direction direction1 : directions) {
 | 
				
			||||||
 | 
					            for (PositionVector.Direction direction2 : directions) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                //create a new instance of Car with default coordinates and velocity 0.
 | 
					                //create a new instance of Car with default coordinates and velocity 0.
 | 
				
			||||||
                setUp();
 | 
					                setUp();
 | 
				
			||||||
| 
						 | 
					@ -132,7 +135,7 @@ class CarTest {
 | 
				
			||||||
                checkVelocity(expectedVelocityX, expectedVelocityY);
 | 
					                checkVelocity(expectedVelocityX, expectedVelocityY);
 | 
				
			||||||
                checkNextPosition(expectedNextPosX, expectedNextPosY);
 | 
					                checkNextPosition(expectedNextPosX, expectedNextPosY);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            for (PositionVector.Direction direction2 : directions) {
 | 
					
 | 
				
			||||||
                car.accelerate(direction2);
 | 
					                car.accelerate(direction2);
 | 
				
			||||||
                expectedVelocityX += direction2.vector.getX();
 | 
					                expectedVelocityX += direction2.vector.getX();
 | 
				
			||||||
                expectedVelocityY += direction2.vector.getY();
 | 
					                expectedVelocityY += direction2.vector.getY();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue