示例#1
0
 public void AddToEnd(int x, int y)
 {
     if (next == null)
     {
         next = new SnakeNode(x, y);
     }
     else
     {
         next.AddToEnd(x, y);
     }
 }
示例#2
0
 public void AddToEnd(int x, int y)
 {
     if (headNode == null)
     {
         headNode = new SnakeNode(x, y);
     }
     else
     {
         headNode.AddToEnd(x, y);
     }
 }