Exemplo n.º 1
0
        public Dot GetNextDot()
        {
            Dot head   = dList.Last();
            Dot nexDot = new Dot(head);

            nexDot.Move(1, direction);
            return(nexDot);
        }
Exemplo n.º 2
0
        public Snake(Dot tail, int length, Direction direction)
        {
            this.direction = direction;
            dList          = new List <Dot>();

            for (int i = 0; i < length; i++)
            {
                Dot d = new Dot(tail);
                d.Move(i, direction);
                dList.Add(d);
            }
        }