protected double connections(int x, int y) {
		// 1 point for each Cell it adds to the available cells of the current
		// color

		double points = 4;
		points = points + (player.getPieces().size() / 15) * 5;
		// Extra points based on how many pieces you have left
		if (player.getPieces().size() == 15) {
			points = points + 25;
			// Major bonus points on the first move with this piece (to avoid
			// being blocked of at the spawn)
		}

		// Subtract 1 point for each neighbouring cell with the same color
		if (board.isCell(x + 1, y)
				&& board.getCell(x + 1, y).hasPieces(
						new Piece(0, player.getColor()))) {
			points--;
		}
		if (board.isCell(x - 1, y)
				&& board.getCell(x - 1, y).hasPieces(
						new Piece(0, player.getColor()))) {
			points--;
		}
		if (board.isCell(x, y + 1)
				&& board.getCell(x, y + 1).hasPieces(
						new Piece(0, player.getColor()))) {
			points--;
		}
		if (board.isCell(x, y - 1)
				&& board.getCell(x, y - 1).hasPieces(
						new Piece(0, player.getColor()))) {
			points--;
		}

		points = points + 2 - Math.max(Math.abs(2 - x), Math.abs(2 - y));
		// Middle Cells are more centralized, thus worth more

		return points;
	}