private static int otherCrozzlePositionSecondInitPosition(int index)
        {
            Random rn = new Random();

            int a = CheckPositionValidation.checkCrozzleEdge();

            switch (a)
            {
            case 0:
                //for (int pi = 0; pi < positionStillCanBePlace.Count(); pi++)
                //for (int i = DataLoad.TCSLNRSBWL.Count() - 1; i >= 0; i--)
                //{
                bool writteda = false;
                while (writteda == false)
                {
                    //for (int x = DataLoad.TCFL.Row; x >= 1; x--)
                    //{
                    //    for (int y = 1; y <= (DataLoad.TCFL.Column - DataLoad.TCSLNRSBWL[i].wordlist.Length); y++)
                    //    {
                    //for (int i = DataLoad.TCSLNRSBWL.Count() - 1; i >= 0; i--)
                    for (int pi = 0; pi < positionSecondCanBePlace.Count(); pi++)
                    {
                        //int x = rn.Next(1, 10);
                        //int y = rn.Next(1, (10 - DataLoad.TCSLNRSBWL[i].wordlist.Length));
                        ////int PX = 2;
                        ////int PY = 1;
                        int x = positionSecondCanBePlace[pi].X;
                        int y = positionSecondCanBePlace[pi].Y;
                        //if (CheckPositionValidation.checkPositionValidation(index, "H", x, y) && CheckPositionValidation.checkPositionExist(index, "H", x, y) && CheckPositionValidation.checkWordNotIntersected(index, "H", x, y) && CheckPositionValidation.checkEachWordSpaceNotTouch(index, "H", x, y))
                        if (CheckPositionValidation.checkPositionValidation(index, "H", x, y))
                        {
                            if (CheckPositionValidation.checkPositionExist(index, "H", x, y))
                            {
                                if (CheckPositionValidation.checkWordNotIntersected(index, "H", x, y))
                                {
                                    if (CheckPositionValidation.checkEachWordSpaceNotTouch(index, "H", x, y))
                                    {
                                        addPosition(index, x, y, "H");
                                        CreateCrozzle.TCSLNRSBWLforloop.RemoveAt(index);
                                        writteda = true;
                                        return(-1);
                                    }
                                }
                            }
                        }
                    }
                    return(index);
                }
                //}
                break;

                //case 1:
                //    //for (int i = DataLoad.TCSLNRSBWL.Count() - 1; i >= 0; i--)
                //    //{

                //    bool writtedb = false;
                //    if (writtedb == false)
                //    {
                //        //int PX = rn.Next(1, 10);
                //        //int PY = rn.Next(1, (10 - DataLoad.TCSLNRSBWL[i].wordlist.Length));
                //        int x = 1;
                //        int y = 1;
                //        //if (CheckPositionValidation.checkPositionValidation(index, "H", x, y) && CheckPositionValidation.checkPositionExist(index, "H", x, y) && CheckPositionValidation.checkWordNotIntersected(index, "H", x, y) && CheckPositionValidation.checkEachWordSpaceNotTouch(index, "H", x, y))
                //        if (CheckPositionValidation.checkPositionValidation(index, "H", x, y))
                //            if (CheckPositionValidation.checkPositionExist(index, "H", x, y))
                //                if (CheckPositionValidation.checkWordNotIntersected(index, "H", x, y))
                //                    if (CheckPositionValidation.checkEachWordSpaceNotTouch(index, "H", x, y))
                //                    {
                //                        addPosition(index, x, y, "H");
                //                        CreateCrozzle.TCSLNRSBWLforloop.RemoveAt(index);
                //                        writtedb = true;
                //                        return -1;
                //                    }
                //        //if (CheckPositionValidation.checkPositionValidation(index, "V", x, y) && CheckPositionValidation.checkPositionExist(index, "V", x, y) && CheckPositionValidation.checkWordNotIntersected(index, "V", x, y) && CheckPositionValidation.checkEachWordSpaceNotTouch(index, "V", x, y))
                //        if (CheckPositionValidation.checkPositionValidation(index, "V", x, y))
                //            if (CheckPositionValidation.checkPositionExist(index, "V", x, y))
                //                if (CheckPositionValidation.checkWordNotIntersected(index, "V", x, y))
                //                    if (CheckPositionValidation.checkEachWordSpaceNotTouch(index, "V", x, y))
                //                    {
                //                        addPosition(index, x, y, "V");
                //                        CreateCrozzle.TCSLNRSBWLforloop.RemoveAt(index);
                //                        writtedb = true;
                //                        return -1;
                //                    }
                //    }
                //    //}
                //    break;

                //case 2:
                //    //for (int i = DataLoad.TCSLNRSBWL.Count() - 1; i >= 0; i--)
                //    //{

                //    bool writtedc = false;
                //    if (writtedc == false)
                //    {
                //        //int PX = rn.Next(1, 10);
                //        //int PY = rn.Next(1, (10 - DataLoad.TCSLNRSBWL[i].wordlist.Length));
                //        int x = DataLoad.TCFL.Row;
                //        int y = DataLoad.TCFL.Column - CreateCrozzle.TCSLNRSBWLforloop[index].wordlist.Length + 1;

                //        //if (CheckPositionValidation.checkPositionValidation(index, "H", x, y) && CheckPositionValidation.checkPositionExist(index, "H", x, y) && CheckPositionValidation.checkWordNotIntersected(index, "H", x, y) && CheckPositionValidation.checkEachWordSpaceNotTouch(index, "H", x, y))
                //        if (CheckPositionValidation.checkPositionValidation(index, "H", x, y))
                //            if (CheckPositionValidation.checkPositionExist(index, "H", x, y))
                //                if (CheckPositionValidation.checkWordNotIntersected(index, "H", x, y))
                //                    if (CheckPositionValidation.checkEachWordSpaceNotTouch(index, "H", x, y))
                //                    {
                //                        addPosition(index, x, y, "H");
                //                        CreateCrozzle.TCSLNRSBWLforloop.RemoveAt(index);
                //                        writtedc = true;
                //                        return -1;
                //                    }
                //        //if (CheckPositionValidation.checkPositionValidation(index, "V", x, y) && CheckPositionValidation.checkPositionExist(index, "V", x, y) && CheckPositionValidation.checkWordNotIntersected(index, "V", x, y) && CheckPositionValidation.checkEachWordSpaceNotTouch(index, "V", x, y))
                //        if (CheckPositionValidation.checkPositionValidation(index, "V", x, y))
                //            if (CheckPositionValidation.checkPositionExist(index, "V", x, y))
                //                if (CheckPositionValidation.checkWordNotIntersected(index, "V", x, y))
                //                    if (CheckPositionValidation.checkEachWordSpaceNotTouch(index, "V", x, y))
                //                    {
                //                        addPosition(index, x, y, "V");
                //                        CreateCrozzle.TCSLNRSBWLforloop.RemoveAt(index);
                //                        writtedc = true;
                //                        return -1;
                //                    }
                //    }
                //    //}
                //    break;
            }
            return(index);
        }
        private static int otherCrozzlePosition(int index)
        {
            for (int k = CreateCrozzle.TCSLNRSBWLforloop[index].wordlist.Length - 1; k >= 0; k--)
            {
                foreach (VerticalWordPosition vwp in VWP)
                {
                    if (CreateCrozzle.TCSLNRSBWLforloop[index].letter[k] == vwp.letter)
                    {
                        int PX = vwp.X;
                        int PY = vwp.Y - k;
                        //if (CheckPositionValidation.checkPositionValidation(index, "H", PX, PY) && CheckPositionValidation.checkPositionExist(index, "H", PX, PY) && CheckPositionValidation.checkcheckPositionCanBePlace(index, "H", PX, PY) && CheckPositionValidation.checkPositionIntersected(index, "H", PX, PY) && CheckPositionValidation.checkEachWordSpaceNotTouch(index, "H", PX, PY))
                        if (CheckPositionValidation.checkPositionValidation(index, "H", PX, PY))
                        {
                            if (CheckPositionValidation.checkPositionExist(index, "H", PX, PY))
                            {
                                if (CheckPositionValidation.checkcheckPositionCanBePlace(index, "H", PX, PY))
                                {
                                    if (CheckPositionValidation.checkPositionIntersected(index, "H", PX, PY))
                                    {
                                        if (CheckPositionValidation.checkEachWordSpaceNotTouch(index, "H", PX, PY))
                                        {
                                            addPosition(index, PX, PY, "H");
                                            CreateCrozzle.TCSLNRSBWLforloop.RemoveAt(index);
                                            return(-1);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }


            for (int k = CreateCrozzle.TCSLNRSBWLforloop[index].wordlist.Length - 1; k >= 0; k--)
            {
                foreach (HorizontalWordPosition hwp in HWP)
                {
                    if (hwp.letter == CreateCrozzle.TCSLNRSBWLforloop[index].letter[k])
                    {
                        int PX = hwp.X - k;
                        int PY = hwp.Y;
                        //if (CheckPositionValidation.checkPositionValidation(index, "V", PX, PY) && CheckPositionValidation.checkPositionExist(index, "V", PX, PY) && CheckPositionValidation.checkcheckPositionCanBePlace(index, "V", PX, PY) && CheckPositionValidation.checkPositionIntersected(index, "V", PX, PY) && CheckPositionValidation.checkEachWordSpaceNotTouch(index, "V", PX, PY))
                        if (CheckPositionValidation.checkPositionValidation(index, "V", PX, PY))
                        {
                            if (CheckPositionValidation.checkPositionExist(index, "V", PX, PY))
                            {
                                if (CheckPositionValidation.checkcheckPositionCanBePlace(index, "V", PX, PY))
                                {
                                    if (CheckPositionValidation.checkPositionIntersected(index, "V", PX, PY))
                                    {
                                        if (CheckPositionValidation.checkEachWordSpaceNotTouch(index, "V", PX, PY))
                                        {
                                            addPosition(index, PX, PY, "V");
                                            CreateCrozzle.TCSLNRSBWLforloop.RemoveAt(index);
                                            return(-1);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }

            return(index);
        }