code: function nextCell(elt) {
      if (elt.c + 1 < actionInfo[elt.r].length) {
        return {r: elt.r, c: elt.c + 1};
      } else if (elt.r + 1 < actionInfo.length) {
        return {r: elt.r + 1, c: 0};
      }
      return null;
    }
docs: Get the next cell, from left to right, top to bottom. Returns null if last element in array reached.