Skip to content

Commit

Permalink
use ByColor.mapReduce
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Jul 9, 2023
1 parent 62df600 commit e21527a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/Divider.scala
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ object Divider:
private def mixedness(board: Board): Int =
mixednessRegions.foldLeft(0):
case (acc, (region, y)) =>
acc + board.byColor.map(c => (c & region).count).reduce(score(y))
acc + board.byColor.mapReduce(c => (c & region).count)(score(y))

0 comments on commit e21527a

Please sign in to comment.