X-Git-Url: http://git.scottworley.com/planeteer/blobdiff_plain/d07f3caa2ea66a0bb7311a6a09d8b32e6751839c..9b3b3d9a3218395450fcc982c3d1c99e85c4e68f:/planeteer.go diff --git a/planeteer.go b/planeteer.go index fd697be..31dc7d0 100644 --- a/planeteer.go +++ b/planeteer.go @@ -25,22 +25,21 @@ import "fmt" var datafile = flag.String("planet_data_file", "planet-data", "The file to read planet data from") +type Commodity struct { + Name string + BasePrice int + CanSell bool + Limit int +} + type planet_data struct { - Commodities []struct { - Name string - BasePrice int - CanSell bool - Limit int - } + Commodities []Commodity Planets []struct { Name string BeaconOn bool /* Use relative prices rather than absolute prices because you can get relative prices without traveling to each planet. */ - RelativePrices []struct { - Name string - Value int - } + RelativePrices map [string] int } }