public void AddToEnd(int x, int y) { if (next == null) { next = new SnakeNode(x, y); } else { next.AddToEnd(x, y); } }
public void AddToEnd(int x, int y) { if (headNode == null) { headNode = new SnakeNode(x, y); } else { headNode.AddToEnd(x, y); } }