예제 #1
0
파일: Snake.cs 프로젝트: NicoleAAs/NIKAAS
        public point GetNextPoint()
        {
            point head      = pList.Last();
            point nextpoint = new point(head);

            nextpoint.Move(1, direction);
            return(nextpoint);
        }
예제 #2
0
파일: Snake.cs 프로젝트: NicoleAAs/NIKAAS
 public Snake(point tail, int length, Direction _direction)
 {
     direction = _direction;
     pList     = new List <point>();
     for (int i = 0; i < length; i++)
     {
         point p = new point(tail);
         p.Move(i, direction);
         pList.Add(p);
     }
 }