src/lib/wordfindgame.js
function (x1, y1, x2, y2) {
            for (var orientation in wordfind.orientations) {
                var nextFn = wordfind.orientations[orientation];
                var nextPos = nextFn(x1, y1, 1);
                if (nextPos.x === x2 && nextPos.y === y2) {
                    return orientation;
                }
            }
            return null;
        }
function (x1, y1, x2, y2) {
            for (var orientation in wordfind.orientations) {
                var nextFn = wordfind.orientations[orientation];
                var nextPos = nextFn(x1, y1, 1);
                if (nextPos.x === x2 && nextPos.y === y2) {
                    return orientation;
                }
            }
            return null;
        }
function ( x1 , y1 , x2 , y2 ) { for ( var orientation in wordfind . orientations ) { var nextFn = wordfind . orientations [ orientation ] ; var nextPos = nextFn ( x1 , y1 , 1 ) ; if ( nextPos . x === x2 && nextPos . y === y2 ) { return orientation ; } } return null ; }
Given two points, ensure that they are adjacent and determine what
orientation the second point is relative to the first

@param {int} x1: The x coordinate of the first point
@param {int} y1: The y coordinate of the first point
@param {int} x2: The x coordinate of the second point
@param {int} y2: The y coordinate of the second point
Given two points ensure that they are adjacent and determine what orientation the second point is relative to the first