Skip to content
Snippets Groups Projects
Commit 44eeb5a1 authored by BAUER Oscar's avatar BAUER Oscar
Browse files

version4 (==version3)

parent 1df2934f
No related branches found
No related tags found
No related merge requests found
...@@ -17,15 +17,15 @@ public class SnakeGame { ...@@ -17,15 +17,15 @@ public class SnakeGame {
} }
public void initialize() { public void initialize() {
direction = Direction.NORTH; direction = Direction.EAST;
int startL = GRID_LINES / 2; int startL = GRID_LINES / 2;
int startC = GRID_COLUMNS / 2; int startC = GRID_COLUMNS / 2;
gameOver = false; gameOver = false;
setApple(); setApple();
segments = new ArrayList<Position>(); segments = new ArrayList<Position>();
segments.add(new Position(startL, startC)); segments.add(new Position(startL, startC));
segments.add(new Position(startL + 1, startC)); segments.add(new Position(startL, startC - 1));
segments.add(new Position(startL + 2, startC)); segments.add(new Position(startL, startC - 2));
} }
...@@ -51,7 +51,6 @@ public class SnakeGame { ...@@ -51,7 +51,6 @@ public class SnakeGame {
return false; return false;
} }
public boolean isAppleAt(Position position) { public boolean isAppleAt(Position position) {
return position.isSamePosition(apple); return position.isSamePosition(apple);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment