public/js-roguelike-skeleton/src/game.js
function(entity, x, y){
            if(!this.entityCanMoveThrough(entity, x, y)){
                return false;
            }
            // check if occupied by entity
            if(this.entityManager.get(x, y)){
                return false;
            }
            return true;
        }
function(entity, x, y){
            if(!this.entityCanMoveThrough(entity, x, y)){
                return false;
            }
            // check if occupied by entity
            if(this.entityManager.get(x, y)){
                return false;
            }
            return true;
        }
function ( entity , x , y ) { if ( ! this . entityCanMoveThrough ( entity , x , y ) ) { return false ; } // check if occupied by entity if ( this . entityManager . get ( x , y ) ) { return false ; } return true ; }
Checks if an entity can move through and into a map tile and that tile is un-occupied.
@method entityCanMoveTo
@param {Entity} entity - The entity to check.
@param {Number} x - The x map tile coord to check.
@param {Number} y - The y map tile coord to check.
@return {Bool}
Checks if an entity can move through and into a map tile and that tile is un - occupied .