Remove unnecessary zeroes check
This commit is contained in:
parent
bb7722399e
commit
f50a25ea3b
1 changed files with 1 additions and 3 deletions
|
|
@ -150,9 +150,7 @@ wordsLeft = classMapWordCount . possibleWords
|
||||||
worstCase :: Class -> M.Map Class Int -> Int
|
worstCase :: Class -> M.Map Class Int -> Int
|
||||||
worstCase c cmap =
|
worstCase c cmap =
|
||||||
let solutions = M.mapKeysWith (+) (score c) cmap
|
let solutions = M.mapKeysWith (+) (score c) cmap
|
||||||
zeroes = M.fromList $ zip [1..S.size c] (repeat 0)
|
maxHitCount = maximum solutions
|
||||||
solutionsWithZeroes = M.union solutions zeroes
|
|
||||||
maxHitCount = maximum solutionsWithZeroes
|
|
||||||
minEliminated = M.size cmap - maxHitCount
|
minEliminated = M.size cmap - maxHitCount
|
||||||
in minEliminated
|
in minEliminated
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue