private double scoreByDepth(Board board, int depth) {
		if (depth == 0) {
			return score(board);
		} else {
			boolean max = board.currentPlayer == initialPlayer;

			double bestScore = score(board);

			for (Intersection move : board.getMoves()) {

				double score = scoreByDepth(board.makeMove(move.x, move.y), depth - 1);

				if (max) {
					if (score > bestScore) {
						score = bestScore;
					}
				} else {
					if (score > bestScore) {
						score = bestScore;
					}
				}
			}

			return bestScore;
		}
	}