}
type Planet struct {
BeaconOn bool
+ Private bool
/* Use relative prices rather than absolute prices because you
can get relative prices without traveling to each planet. */
RelativePrices map[string]int
}
func FillCellBySelling(data planet_data, dims []int, table []State, addr []int) {
+ if data.Planets[data.i2p[addr[Location]]].Private {
+ // Can't do commerce on private planets
+ return
+ }
if addr[Hold] > 0 {
// Can't sell and still have cargo
return
}
func FillCellByBuying(data planet_data, dims []int, table []State, addr []int) {
+ if data.Planets[data.i2p[addr[Location]]].Private {
+ // Can't do commerce on private planets
+ return
+ }
if addr[Hold] == 0 {
// Can't buy and then have nothing
return