From 72bd89a2af550c5bc33fb05a337c3b30dfb5b8af Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 19 Sep 2017 17:46:04 -0700 Subject: [PATCH] Add another AddressDecoder debug message --- src/main/scala/diplomacy/AddressDecoder.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/scala/diplomacy/AddressDecoder.scala b/src/main/scala/diplomacy/AddressDecoder.scala index 9000c7ab..5e54d173 100644 --- a/src/main/scala/diplomacy/AddressDecoder.scala +++ b/src/main/scala/diplomacy/AddressDecoder.scala @@ -123,6 +123,8 @@ object AddressDecoder val candidates = bits.map { bit => val result = partitionPartitions(partitions, bit) val score = bitScore(result) + if (debug) + println(" For bit %x, %s".format(bit, score.toString)) (score, bit, result) } val (bestScore, bestBit, bestPartitions) = candidates.min(Ordering.by[(Seq[Int], BigInt, Partitions), Iterable[Int]](_._1.toIterable))