/// <summary>
        /// Search word diagonally upward from left to right
        /// </summary>

        public List <XY> Diagonal2UpwardSearch(string word)
        {
            List <XY> res = new List <XY>();

            this.wordDetail = this.wordDetail ?? new WordDetail(matrix, word);

            foreach (var firstCharXY in wordDetail.CharDetails[0].XYs)
            {
                res = new List <XY>
                {
                    firstCharXY
                };

                for (int i = 1; i < wordDetail.CharDetails.Count; i++)
                {
                    var items = wordDetail.CharDetails[i].XYs
                                .Where(c => c.Y == res.Last().Y - 1 && c.X == res.Last().X + 1)
                                .ToList();

                    if (items.Count() == 1)
                    {
                        res.Add(items[0]);
                    }
                    else
                    {
                        break;
                    }
                }

                // break and return for the first word found
                if (res.Count == wordDetail.CharDetails.Count)
                {
                    break;
                }
            }

            return(res);
        }
        /// <summary>
        /// Search word in horizontally, vertically, diagonally, reverse
        /// </summary>

        public List <XY> Search(string word)
        {
            List <XY> res = new List <XY>();

            this.wordDetail = new WordDetail(matrix, word);
            bool isFound = false;

            res = HorizontalSearch(word);
            if (res.Count == word.Length)
            {
                isFound = true;
            }

            if (!isFound)
            {
                res = HorizontalReverseSearch(word);
                if (res.Count == word.Length)
                {
                    isFound = true;
                }
            }
            if (!isFound)
            {
                res = VerticalDownwardSearch(word);
                if (res.Count == word.Length)
                {
                    isFound = true;
                }
            }

            if (!isFound)
            {
                res = VerticalUpwardSearch(word);
                if (res.Count == word.Length)
                {
                    isFound = true;
                }
            }

            if (!isFound)
            {
                res = DiagonalDownwardSearch(word);
                if (res.Count == word.Length)
                {
                    isFound = true;
                }
            }

            if (!isFound)
            {
                res = DiagonalUpwardSearch(word);
                if (res.Count == word.Length)
                {
                    isFound = true;
                }
            }

            if (!isFound)
            {
                res = Diagonal2DownwardSearch(word);
                if (res.Count == word.Length)
                {
                    isFound = true;
                }
            }

            if (!isFound)
            {
                res = Diagonal2UpwardSearch(word);
                if (res.Count == word.Length)
                {
                    isFound = true;
                }
            }

            return(res);
        }