We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e760934 commit ef729fcCopy full SHA for ef729fc
1 file changed
Sources/lib/GameFinder.swift
@@ -50,17 +50,14 @@ actor GameFinder {
50
}
51
52
private static var tileSizes: Dictionary<Int, Array<Int>> {
53
- validWordLengths.reduce([:]) { dict, wordLength in
54
- var dict = dict
+ validWordLengths.reduce(into: [:]) { dict, wordLength in
55
dict[wordLength] = Array(repeating: minCharactersPerTile, count: numTilesPerFourtile)
56
while dict[wordLength]!.reduce(0, +) < wordLength {
57
guard let index = dict[wordLength]!.firstIndex(where: { $0 < maxCharactersPerTile }) else {
58
fatalError("Couldn’t generate tileSizes")
59
60
dict[wordLength]![index] += 1
61
62
-
63
- return dict
64
65
66
0 commit comments