From: Scott Worley Date: Thu, 3 Nov 2011 23:10:48 +0000 (-0700) Subject: Only warp to planets with their beacons on. X-Git-Url: http://git.scottworley.com/planeteer/commitdiff_plain/beb45aca52dcfc46c014fc70f2e433bf3cad571f?hp=1c1ede6836ed424330981ce160a8dd38e6759f48 Only warp to planets with their beacons on. --- diff --git a/planeteer.go b/planeteer.go index c207c13..9ff2de7 100644 --- a/planeteer.go +++ b/planeteer.go @@ -278,7 +278,9 @@ func FillCellByArriving(data planet_data, dims []int, table []State, addr []int) if addr[Fuel]+2 < dims[Fuel] { other[Fuel] = addr[Fuel] + 2 for other[Location] = 0; other[Location] < dims[Location]; other[Location]++ { - UpdateCell(table, my_index, EncodeIndex(dims, other), 0) + if data.Planets[data.i2p[addr[Location]]].BeaconOn { + UpdateCell(table, my_index, EncodeIndex(dims, other), 0) + } } other[Location] = addr[Location] other[Fuel] = addr[Fuel]