X-Git-Url: http://git.scottworley.com/planeteer/blobdiff_plain/dd6c757dacbc44d4edb6ed5de319ef124ff75d4f..7393f03acb869b7afced7692bbf86576cd3d669b:/planeteer.go diff --git a/planeteer.go b/planeteer.go index 71a85dc..42a7236 100644 --- a/planeteer.go +++ b/planeteer.go @@ -633,14 +633,14 @@ func FighterAndShieldCost(data planet_data, dims LogicalIndex, table []State, be final_state[BuyFighters] = 0 alt_best := FindBestState(data, dims, table, final_state) cost := table[alt_best].value - table[best].value - fmt.Println("\rDrones were", float64(cost)/float64(*drones), "each") + fmt.Printf("\rDrones were %.2f each\n", float64(cost)/float64(*drones)) } if *batteries > 0 { final_state := FinalState(dims) final_state[BuyShields] = 0 alt_best := FindBestState(data, dims, table, final_state) cost := table[alt_best].value - table[best].value - fmt.Println("\rBatteries were", float64(cost)/float64(*batteries), "each") + fmt.Printf("\rBatteries were %.2f each\n", float64(cost)/float64(*batteries)) } } @@ -807,7 +807,7 @@ func main() { best := FindBestState(data, dims, table, final_state) print("\n") if best == -1 { - print("Cannot acheive success criteria\n") + print("Cannot achieve success criteria\n") return } description := DescribePath(data, dims, table, best)