Now I have method that return one word when I search for it , e.g
System.out.println(detectAllWords(wordSearch, "same"));
I get back only one directories, but I have three words "same" in table now. It's the problem? Have I good understanding, that I need return every word from crossword? If you see other problems in my code give me a hint :)
{'f', 'd', 'e', 'r', 'l', 'k'},
                {'s', 's', 'a', 'm', 'e', 'o'},
                {'a', 'n', 'a', 'r', 'o', 'v'},
                {'m', 's', 'a', 'm', 'e', 'h'},
                {'e', 'o', 'e', 'e', 'e', 'j'}