package objects; import java.util.ArrayList; public class Snake { short x, y; ArrayList lp = new ArrayList(); public Snake(short x, short y) { this.x = x; this.y = y; } public void up(short x, short y, short direction) { lp.add(new Point(x, y, direction)); } public ArrayList getPoints() { return lp; } public short getX() { return this.x; } public short getY() { return this.y; } public void setX(short x) { this.x = x; } public void setY(short y) { this.y = y; } }