public boolean canMove(Agent a){
		Facing face = a.getFacing();
		int x = a.getTileX();
		int y = a.getTileY();
		/**
		 * The following code gets the width and height of the sprite (in tiles) as these things could be variable (like 2x2,2x3,3x5, etc).
		 * Because of the variable dimensions, loops are used to make sure every relevant block (based on the Facing value) was checked for
		 * collision, whether it be 2 blocks, 3, 4, etc.
		 */
		int w = a.getActor().getSpriteWidth();
		int h = a.getActor().getSpriteHeight();
		
			switch (face){
			case EAST:
				if (x + w >= getWidth()){
					return false;
				}
				for (int i = 0; i < h; i++){
					if (red[x + w][y + i] == 1){
						return false;
					}
				}
				break;
			case NORTH:
				if (y - 1 < 0){
					return false;
				}
				for (int i = 0; i < w; i++){
					if (red[x + i][y - 1] == 1){
						return false;
					}
				}
				break;
			case SOUTH:
				if (y + h >= getHeight()){
					return false;
				}
				for (int i = 0; i < w; i++){
					if (red[x + i][y + h] == 1){
						return false;
					}
				}
				break;
			case WEST:
				if (x - 1 < 0){
					return false;
				}
				for (int i = 0; i < h; i++){
					if (red[x - 1][y + i] == 1){
						return false;
					}
				}
				break;
			default:
				break;
		
			}
		return true;
	}