int evaluate(Move m, Board b, int depth, Side s) {
        if (depth <= 0) {
            return value(b, s);
        }
        Side player = m.movingPiece(b).side();
        int alpha = player == s ? -1 : 1;
        MutableBoard next = new MutableBoard(b);
        next.makeMove(m);
        Iterator<Move> moves = next.legalMoves();
        Move nextMove;
        while (moves.hasNext()) {
            nextMove = moves.next();
            int score = evaluate(nextMove, next, depth - 1, s);
            alpha = player == s ? Math.max(alpha, score) : Math.min(alpha,
                    score);
        }
        next.retract();
        return alpha;

    }