public boolean canMove()
    {
        Grid<Actor> gr = getGrid();
        if (gr == null)
            return false;
        Location loc = getLocation();
        if(!type)//if AI
        {
        	if(AIdegree == 1)
        		setDirection(LevelA.chooseD(this));
        	if(AIdegree == 2)
        		setDirection(LevelB.chooseD(this));
        	if(AIdegree == 3)
        		setDirection(LevelC.chooseD(this));
        }//if(!type)//if AI
        Location next = loc.getAdjacentLocation(getDirection());
        if (!gr.isValid(next))        
            return false;
        Actor neighbor = gr.get(next);
        return (neighbor instanceof Background);
    }//public boolean canMove()