Browse Source

Update Unit Test Snake

main
Justin Senn 2 years ago
parent
commit
2ecad6f794
  1. 6
      src/test/java/SnakeTest.java

6
src/test/java/SnakeTest.java

@ -31,6 +31,12 @@ class SnakeTest {
Snake snake = new Snake(gridSize);
snake.reset();
snake.setDirection(Snake.SnakeDirection.UP);
snake.update();
ArrayList<Point> bodySegments = snake.getBodySegments();
assertEquals(new Point(gridSize / 2, gridSize / 2 - 1), bodySegments.get(0));
assertEquals(new Point(gridSize / 2, gridSize / 2), bodySegments.get(1));
}

Loading…
Cancel
Save