func CreateStateTable(data planet_data, dims []int) []State {
table := make([]State, StateTableSize(dims))
for i := range table {
func CreateStateTable(data planet_data, dims []int) []State {
table := make([]State, StateTableSize(dims))
for i := range table {
- table[EncodeIndex(dims, addr)].value = int32(*funds)
+ start_index := EncodeIndex(dims, addr)
+ table[start_index].value = int32(*funds)
+ table[start_index].from = FROM_ROOT
func CellValue(data planet_data, dims []int, table []State, addr []int) int32 {
my_index := EncodeIndex(dims, addr)
func CellValue(data planet_data, dims []int, table []State, addr []int) int32 {
my_index := EncodeIndex(dims, addr)
best_source := make([]int, NumDimensions)
other := make([]int, NumDimensions)
copy(other, addr)
best_source := make([]int, NumDimensions)
other := make([]int, NumDimensions)
copy(other, addr)
// Sanity check: This cell was in state BEING_EVALUATED
// the whole time that it was being evaluated.
// Sanity check: This cell was in state BEING_EVALUATED
// the whole time that it was being evaluated.
}
func DescribePath(data planet_data, dims []int, table []State, start int32) (description []string) {
}
func DescribePath(data planet_data, dims []int, table []State, start int32) (description []string) {
var line string
addr := DecodeIndex(dims, index)
prev := DecodeIndex(dims, table[index].from)
var line string
addr := DecodeIndex(dims, index)
prev := DecodeIndex(dims, table[index].from)