+/* Fill in the cell at address addr by looking at all the possible ways
+ * to reach this cell and selecting the best one.
+ *
+ * The other obvious implementation choice is to do this the other way
+ * around -- for each cell, conditionally overwrite all the other cells
+ * that are reachable *from* the considered cell. We choose gathering
+ * reads over scattering writes to avoid having to take a bunch of locks.
+ *
+ * The order that we check things here matters only for value ties. We
+ * keep the first best path. So when action order doesn't matter, the
+ * check that is performed first here will appear in the output first.
+ */
+func FillStateTableCell(data planet_data, dims []int, table []State, addr []int) {
+ /* Travel here via jumping */
+ /* Travel here via Eden Warp Unit */
+ /* Silly: Dump Eden warp units */
+ /* Buy Eden warp units */
+ /* Buy a Device of Cloaking */
+ /* Silly: Dump a Device of Cloaking */
+ /* Buy Fighter Drones */
+ /* Buy Shield Batteries */
+ if addr[Hold] == 0 {
+ /* Sell or dump things */
+ for commodity := range data.Commodities {
+ }
+ } else {
+ /* Buy this thing */
+ }
+ /* Visit this planet */