int possibleMovesNum(Point[] grid, Pair pr) {
	int possible = 0;
	for (int i = 0; i < size; i++) {
		for (int j = 0; j < size; j++) {
			Point currentPoint = pointAtGridIndex(grid, i, j);
			if (currentPoint.value == 0) {
				continue;
			}
			for (Pair d : directionsForPair(pr)) {
				if (isValidBoardIndex(i + d.p, j + d.q)){
					Point possiblePairing = pointAtGridIndex(grid, i + d.p, j + d.q);
					if (currentPoint.value == possiblePairing.value) {
						possible = possible + 2; //if you pile on them and if they pile on you
					}
				}
				
			}
		}
	}
	
	return possible;
}