コード例 #1
0
ファイル: Snake.cs プロジェクト: Photon74/Snake
        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);
        }