X-Git-Url: http://git.scottworley.com/planeteer/blobdiff_plain/fcdc120bb1d01853dc3402284c2e33537cac14b4..4d7362df7162d893bfdadadee13fe12bfeb78738:/planeteer.go diff --git a/planeteer.go b/planeteer.go index 060456d..a2406ab 100644 --- a/planeteer.go +++ b/planeteer.go @@ -429,6 +429,14 @@ func FillCellByMisc(data planet_data, dims []int, table []State, addr []int) { } /* Visit this planet */ + var i uint + for i = 0; i < uint(len(visit())); i++ { + if addr[Visit] & (1 << i) != 0 && visit()[i] == data.i2p[addr[Location]] { + other[Visit] = addr[Visit] & ^(1 << i) + UpdateCell(table, my_index, EncodeIndex(dims, other), 0) + } + } + other[Visit] = addr[Visit] } @@ -618,6 +626,10 @@ func DescribePath(data planet_data, dims []int, table []State, start int) (descr if addr[BuyFighters] == 1 && prev[BuyFighters] == 0 { line += fmt.Sprint("Buy ", *drones, " Fighter Drones") } + if addr[Visit] != prev[Visit] { + // TODO: verify that the bit chat changed is addr[Location] + line += fmt.Sprint("Visit ", data.i2p[addr[Location]]) + } if line == "" { line = fmt.Sprint(prev, " -> ", addr) }