define(["lib/astar"],function(e){var t=Class.extend({init:function(e,t){this.width=e,this.height=t,this.grid=null,this.blankGrid=[],this.initBlankGrid_(),this.ignored=[]},initBlankGrid_:function(){for(var e=0;e0;u-=1){i=r[u][0],s=r[u][1];if(this.grid[s][i]===0){o=e(this.grid,t,[i,s]);break}}return o},ignoreEntity:function(e){e&&this.ignored.push(e)},applyIgnoreList_:function(e){var t=this,n,r,i;_.each(this.ignored,function(i){n=i.isMoving()?i.nextGridX:i.gridX,r=i.isMoving()?i.nextGridY:i.gridY,n>=0&&r>=0&&(t.grid[r][n]=e?0:1)})},clearIgnoreList:function(){this.applyIgnoreList_(!1),this.ignored=[]}});return t});