public static Tile getTileConnectedToEntity(Entity e, int location){
		if (map != null) {		
			switch (location) {
			case UP:
				return map.getTile(e.getX(),e.getY()-e.getHeight());
			case DOWN:
				return map.getTile(e.getX(),e.getY());
			case LEFT:
				return map.getTile(e.getX()-e.getWidth(),e.getY()-1);
			case RIGHT:
				return map.getTile(e.getX()+e.getWidth(),e.getY()-1);
			default:
				return null;
			}
		}
		return null;
	}