From: Scott Worley Date: Wed, 2 Nov 2011 23:43:24 +0000 (-0700) Subject: Fix bug: account for the empty hold X-Git-Url: http://git.scottworley.com/planeteer/commitdiff_plain/c67c206aab4588c5264e33d78571882c2c8f8f31 Fix bug: account for the empty hold --- diff --git a/planeteer.go b/planeteer.go index 9f0ede9..ca90a02 100644 --- a/planeteer.go +++ b/planeteer.go @@ -178,7 +178,7 @@ func DimensionSizes(data planet_data) []int { dims[UnusedCargo] = eden_capacity + cloak_capacity + 1 dims[Fuel] = *fuel + 1 dims[Location] = len(data.Planets) - dims[Hold] = len(data.Commodities) + dims[Hold] = len(data.Commodities) + 1 dims[NeedFighters] = bint(*drones > 0) + 1 dims[NeedShields] = bint(*batteries > 0) + 1 dims[Visit] = 1 << uint(len(visit()))