Beispiel #1
0
Datei: Snake.cs Projekt: MIDgar/t
        public ClassPoint GetNextPoint()
        {
            ClassPoint head      = pList.Last();
            ClassPoint nextPoint = new ClassPoint(head);

            nextPoint.Move(1, direction);
            return(nextPoint);
        }
Beispiel #2
0
Datei: Snake.cs Projekt: MIDgar/t
 public Snake(ClassPoint tail, int lenght, Direction _direction)
 {
     direction = _direction;
     pList     = new List <ClassPoint>();
     for (int i = 0; i < lenght; i++)
     {
         ClassPoint p = new ClassPoint(tail);
         p.Move(i, direction);
         pList.Add(p);
     }
 }