Ejemplo n.º 1
0
        public bool IsHittingItself() // Врезалась ли змейка в свой хвост
        {
            Point head = pointsList.Last();

            for (int i = 0; i < pointsList.Count - 2; i++)
            {
                if (head.IsCoincide(pointsList[i]))
                {
                    return(true);
                }
            }
            return(false);
        }