X-Git-Url: http://git.scottworley.com/planeteer/blobdiff_plain/b7a6e28b4e3619a9b8ff18285bba9876de52549c..1fc3e5f6bd49d56f3c3ec9584a29aaa1467c7096:/planeteer.go diff --git a/planeteer.go b/planeteer.go index 82650b9..a3fb84c 100644 --- a/planeteer.go +++ b/planeteer.go @@ -734,7 +734,7 @@ func main() { final_state[BuyShields] = 1 } - // Use extra eden warps + // Use extra eden warps / cost of --end_edends if *end_edens > 0 { fmt.Println() } @@ -757,8 +757,19 @@ 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 - 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 + // Cost of --end + if len(end()) > 0 { + save_end_string := *end_string + *end_string = "" + end_cache = nil + alt_best := FindBestState(data, dims, table, final_state) + cost := table[alt_best].value - table[best].value + fmt.Printf("\r\n%11v Cost of --end %v\n", Commas(cost), save_end_string) + *end_string = save_end_string + } + }