diff --git a/src/test/java/SnakeTest.java b/src/test/java/SnakeTest.java index 22130a9..1658151 100644 --- a/src/test/java/SnakeTest.java +++ b/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 bodySegments = snake.getBodySegments(); + assertEquals(new Point(gridSize / 2, gridSize / 2 - 1), bodySegments.get(0)); + assertEquals(new Point(gridSize / 2, gridSize / 2), bodySegments.get(1)); + }