()
| 21 | } |
| 22 | public String getWord() { return word; } |
| 23 | public String scrambleWord() { |
| 24 | List<Character> chars = Arrays.asList( |
| 25 | ConvertTo.boxed(word.toCharArray())); |
| 26 | Collections.shuffle(chars, rand); |
| 27 | StringBuilder result = new StringBuilder(); |
| 28 | for(char ch : chars) |
| 29 | result.append(ch); |
| 30 | return result.toString(); |
| 31 | } |
| 32 | @TestProperty |
| 33 | static List<String> input = |
| 34 | Arrays.asList(theory.split(" ")); |