]> git.scottworley.com Git - planeteer/commitdiff
Print visit costs with fixed width for vertical alignment.
authorScott Worley <sworley@chkno.net>
Thu, 21 Jun 2012 07:54:51 +0000 (00:54 -0700)
committerScott Worley <sworley@chkno.net>
Thu, 21 Jun 2012 07:54:51 +0000 (00:54 -0700)
planeteer.go

index 82650b9ffe88e72179ef149d87bf350bd4cdeee6..a6272f807ba9a2d26a05f5352ff3bd07f8304213 100644 (file)
@@ -757,7 +757,7 @@ func main() {
                final_state[Visit] = all_bits & ^(1 << i)
                alt_best := FindBestState(data, dims, table, final_state)
                cost := table[alt_best].value - table[best].value
                final_state[Visit] = all_bits & ^(1 << i)
                alt_best := FindBestState(data, dims, table, final_state)
                cost := table[alt_best].value - table[best].value
-               fmt.Println("\r", Commas(cost), "Cost to visit", visit()[i])
+               fmt.Printf("\r%11v Cost to visit %v\n", Commas(cost), visit()[i])
        }
        final_state[Visit] = dims[Visit] - 1
 
        }
        final_state[Visit] = dims[Visit] - 1