public/js-roguelike-skeleton/manual/index/entity/js/basic-movement.js
function(direction){
            var directionCoords = {
                up:     {x: 0, y:-1},
                right:  {x: 1, y: 0},
                down:   {x: 0, y: 1},
                left:   {x:-1, y: 0}
            };
            return directionCoords[direction];
        }
function(direction){
            var directionCoords = {
                up:     {x: 0, y:-1},
                right:  {x: 1, y: 0},
                down:   {x: 0, y: 1},
                left:   {x:-1, y: 0}
            };
            return directionCoords[direction];
        }
function ( direction ) { var directionCoords = { up : { x : 0 , y : - 1 } , right : { x : 1 , y : 0 } , down : { x : 0 , y : 1 } , left : { x : - 1 , y : 0 } } ; return directionCoords [ direction ] ; }
Gets the adjustment coord from a direction string.
@method directionToAdjustCoord
@param {String} direction - The current direction.
@return {Object} {x: 0, y: 0}
Gets the adjustment coord from a direction string .