src/parse-map.js
function nextNeighbor(elt, dir) {
    var drow = 0, dcol = 0;
    if (dir == "none") {
      return null;
    } else {
      var offset = directions[dir];
      return {r: elt.r + offset[0], c: elt.c + offset[1]};
    }
  }
function nextNeighbor(elt, dir) {
    var drow = 0, dcol = 0;
    if (dir == "none") {
      return null;
    } else {
      var offset = directions[dir];
      return {r: elt.r + offset[0], c: elt.c + offset[1]};
    }
  }
function nextNeighbor ( elt , dir ) { var drow = 0 , dcol = 0 ; if ( dir == "none" ) { return null ; } else { var offset = directions [ dir ] ; return { r : elt . r + offset [ 0 ] , c : elt . c + offset [ 1 ] } ; } }
Takes the current location and direction at this point and returns the next location to check. Returns null if this cell is not part of a shape.
Takes the current location and direction at this point and returns the next location to check . Returns null if this cell is not part of a shape .