I am sure that someone there can answer this in a few seconds ...
All that interests me is that this piece of code is read from bottom to top? The comments say that the snake initially moves east, then heads the NORTH, and when I launch it, this statement is true. But the coordinates go from 7.7 to 6.7, then 5.7, and so on ... Isn't this a snake connected to the west? or is the code read from bottom to top?
Here is a snippet of code.
private void initNewGame() {
mSnakeTrail.clear();
mAppleList.clear();
mSnakeTrail.add(new Coordinate(7, 7));
mSnakeTrail.add(new Coordinate(6, 7));
mSnakeTrail.add(new Coordinate(5, 7));
mSnakeTrail.add(new Coordinate(4, 7));
mSnakeTrail.add(new Coordinate(3, 7));
mSnakeTrail.add(new Coordinate(2, 7));
mNextDirection = NORTH;
source
share