public Components.Coordinate_Info[] Next_XY_Strait_Crossword(Point LastCoordinatePass, Components.Word word, char password)
        {
            // opisać
            var coordinate_Info = new List <Components.Coordinate_Info>();

            var currentCoordPass = new Point();

            var currentCoordPassCounter = 0;

            for (int i = 0; i < word.Value.Length; i++)
            {
                var letter = word.Value[i];

                //Sprawdza czy zmienna letter (przechowuje litere)
                if (password.Equals(letter))
                {
                    currentCoordPass        = new Point(LastCoordinatePass.X + 1, i);
                    currentCoordPassCounter = i;
                    break;
                }
            }

            var fakeCounter      = 0;
            var passLetterWasSet = false;
            var startY           = LastCoordinatePass.Y - currentCoordPass.Y;

            for (var i = startY; i < word.Value.Length + startY; i++)
            {
                var letter          = word.Value[fakeCounter];
                var passwordchecker = false;

                if (!passLetterWasSet && fakeCounter == currentCoordPassCounter)
                {
                    passwordchecker  = true;
                    passLetterWasSet = true;
                }

                var coordInfo = new Components.Coordinate_Info(letter, passwordchecker, new Point(LastCoordinatePass.X + 1, i));

                coordinate_Info.Add(coordInfo);

                fakeCounter++;
            }


            return(coordinate_Info.ToArray());
        }
        public Components.Coordinate_Info[] Create_Coordinate_Strait_Crossword(List <Components.SingleElement> element, Components.Word word, char password)
        {
            Components.Coordinate_Info LastCoordinatePass = null;

            if (element.Count > 0)
            {
                LastCoordinatePass = element[element.Count - 1]
                                     .Coordinate_Info.Select(c => c)
                                     .Where(c => c.Passwordchcecker)
                                     .FirstOrDefault();
            }

            if (LastCoordinatePass == null)
            {
                return(First_XY_Strait_Crossword(word, password));
            }
            else
            {
                return(Next_XY_Strait_Crossword(LastCoordinatePass.Coordinate, word, password));
            }
        }
        public Components.Coordinate_Info[] First_XY_Strait_Crossword(Components.Word word, char password)
        {
            // zmienna
            var coordinate_Info  = new List <Components.Coordinate_Info>();
            var passLetterWasSet = false;

            for (int i = 0; i < word.Value.Length; i++)
            {
                //zmienna przechowuje litere z hasła
                var letter = word.Value[i];

                var passwordchcecker = false;

                //Sprawdza czy zmienna letter (która przechowuje Litere :0)
                if (!passLetterWasSet && password.Equals(letter))
                {
                    passwordchcecker = true;
                    passLetterWasSet = true;
                }

                /*
                 * Ta zmienna przechowuje klase Coordinate_Info
                 * klasa przechowuje Litere, bool czy to jeest litera,i jej koordynaty w pierwszej lini
                 * dlatego mamy (0,i)
                 */
                var coordinateinfo = new Components.Coordinate_Info(letter, passwordchcecker, new Point(0, i));

                /*
                 * dodajemy do tablicy coordinate_Info
                 *  zmienna coordinateinfo
                 *
                 */
                coordinate_Info.Add(coordinateinfo);
            }

            //zwraca tablice z współrzędnymi
            return(coordinate_Info.ToArray());
        }